Re: [css3-images] linear-gradient keywords and angles are opposite

On Fri, Jun 10, 2011 at 2:35 AM, Florian Rivoal <florianr@opera.com> wrote:
> On Fri, 10 Jun 2011 14:27:06 +0900, Brad Kemper <brad.kemper@gmail.com>
> wrote:
>> That is the most positive review of the idea I have heard yet! :)
>>
>> Other pluses: It also reduces the number of keywords needed to just one,
>> allows you to create some gradients that you wouldn't otherwise be able to
>> (but with hardly any added complexity), and makes every author word their
>> linear gradients in a more similar fashion (which makes learning the syntax
>> by looking at examples easier).
>
> Sorry, I am new here. Has this been discussed before? What were the
> objections?

To summarize my argument from the threads Brad links, I think the
mental indirection required to make a corner-to-corner gradient is
unfortunate.  In general, I'm okay with complexity and direct,
meaningful indirection, but not more opaque indirection.  For example,
something like "45deg to-corner" meaning "adjust the 45deg slightly to
point at the nearest corner" would be okay, because it says what it
means (any angle between 0deg and 90deg would have the same effect, I
guess).  "45deg as-square" requires you to first imagine an ideal
square with a 45deg angle, then scale that square to the size of the
box.

It also gives more power than necessary.  "22.5deg as-square" doesn't
make a corner-to-corner gradient, it makes a gradient where the
endpoints map to the same scaled locations that a 22.5deg gradient
would on a square.  That sort of power doesn't actually have a
use-case.  This isn't necessarily a problem, but it's something to
keep in mind, as a less-powerful mechanism may be appropriate.

Finally, it's not consistent enough.  If it was a mechanism for
actually sizing gradients to a particular square, so they could then
be scaled directly, I'd be more receptive.  Instead, it only sets up
the square for the purpose of defining the angle, then the rest of the
gradient is resolved against the full-size box.

But anyway!  Simon's right that this particular thread has gone on for
far too long.  I'll start a new top-level with a summary.

~TJ

Received on Friday, 10 June 2011 17:35:14 UTC