Re: Gradient syntax proposal

So, hey, let's talk about my proposal.  ^_^

The color-stop syntax should be uncontroversial.  It's roughly what
everyone else is using.  It's a string of comma-separated colors,
optionally paired with %.  Colors without % are inferred to be equally
spaced.

The important bit is just the productions at the beginning that define
the gradient-line.  I spent some time thinking about the gradients
that I have used on websites before, and ones that I'd like to use in
the future, to come up with the set of ways of specify a linear
gradient.

Firstly (for me), you've got the simply horizontal and vertical
gradients.  These are most simply specified (to me) by simply saying
which sides you want to go between, so "left right"/"top bottom"/etc.

Secondly, corner-to-corner gradients.  These are again specified very
simply by just indicating which corner you want to start them from, so
"top left" would go from the top-left corner to the bottom-right
corner.

That exhausts what can be specified by simple keywords.  Then we have
specific angles.  Just specify an angle and you're done.  I added the
'inner' and 'outer' keywords because I can think of designs that would
call for both.

Finally, for nearly all the cases not covered by the above, the fuller
bg-position syntax is available to specify the endpoints of the
gradient-line.


Am I missing anything?  Am I making anything too complex?  Are there
ways to improve this/make it simpler/make it prettier?

~TJ

Received on Friday, 14 August 2009 14:35:36 UTC