RE: Gradient syntax proposal

Tab Atkins Jr. wrote:
| You mean like having a gradient slide just by changing the 
| background-position?

I was thinking of an upsized gradient reducing in size until it fit the element width. And the reverse, initially highlighting a portion of a box, then having the highlight expand and dissipate. Flash-type effects.

| What I'm considering doing is requiring that your stops be in order,
| and saying that if a later stop specifies a position before an earlier
| stop, it's treated as being *on* the previous stop.

How about "Color-stops must be in ascending order based on position. If a color-stop specifies a position before a previous color-stop, its position is changed to that of the previous stop." I much prefer that to having mixed position types invalidating the rule. It is possible there could be situations where mixed types are desirable, where it would not be a disaster if two points coincided and forced a hard color transition.

| I'd put in an advisory that it's usually a bad idea to mix unit types
| in color-stops, of course.

And why. And then let folks do what they will and face the consequences.
 
| This would also significantly clean up the language for determining
| the default value of the last stop.  I can just switch it back to
| being always 100%, and let the ordering rule take care of pushing it
| further out if necessary.

Sounds good.

David Perrell

Received on Monday, 17 August 2009 06:08:08 UTC