Re: Gradient syntax proposal

On Sat, Aug 15, 2009 at 1:37 AM, Brad Kemper<brad.kemper@gmail.com> wrote:
> On Aug 14, 2009, at 4:13 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>
>> I'd drop the combination keywords, because you can write them
>> as <bg-position>. (top-left vs top left is not an improvement,
>> just makes things more confusing).
>
>
> I'd much rather drop bg-position (in case you couldn't tell by now) and just
> have one word to say what direction to fill the box (sometimes implied by
> the name of a side or corner, sometimes the other way around), and no more
> than one "how far along that direction" per color. That would take care of
> 99.999% of the author's needs and be far, far simpler. I really can't see
> the compelling need to be able to specify a starting position different from
> first color's position, or an ending position different from the ending
> color's position. THAT makes it much harder to read and more confusing.

I think you may be slightly confused about how the <bg-position>
construction works.  It doesn't specify "a starting position different
from the first color's position".  It just sets where the 0% point is
(and the 100% point, for the other one).  Assuming you're setting your
starting point at 0%, or omitting the length so that it defaults to
that, then the first color will start exactly where the <bg-position>
specifies.

As well, the simple use-cases you want *are already covered*.  You
*can* specify only an angle and have it just work, or specify only a
side or corner.  These all work exactly as one would expect them too,
and they're ridiculously simple.  If that's all an author needs, then
that's all they have to do, and a few examples of this simple stuff
would suffice to drill this in.  Allowing the full bg-position syntax
only adds complexity if one wants it, and it doesn't add any
complexity to the implementation (well, the parsing is *slightly* more
complex, but they can reuse the existing <bg-position> parsing code,
and actually generating the image is no more work - once you can
generate gradients at an arbitrary angle, you've pretty much
implemented *everything*).

~TJ

Received on Saturday, 15 August 2009 14:57:17 UTC