RE: Gradient syntax proposal

Brad Kemper wrote:
| If you use an angle, then that tells you what side or corner to start
| from. This seems mostly uncontested, and no one has said it needs to
| be combned with <bg-position> (because the first and last color stops
| can have percentages or lengths). But the reverse is also true: if you
| use a single keyword to indicate what side or corner to start from,
| then it tells you the angle (towards the opposite side or corner).  It
| doesnt need to be combned with <bg-position> (because the first and
| last color stops can have percentages or lengths). Same same. Thus:
|
| [<angle> | <starting-corner-or-side>]

Yes, that would suffice. But I expect the simplest <bg-position> forms would
be the most commonly used. With existing keywords that are no more
complicated than what you propose (e.g. linear-gradient: left top / blue,
red ;).

| If you allow lengths and percentages in the same list of color stops,
| then stops could trade places based on the size of the box they are in.

Not if stops are forced to be in ascending order, so if a color-stop
specifies a position before a previous color-stop, its position is changed
to that of the previous stop. There are situations where that might be
considered graceful degradation.

David Perrell

Received on Monday, 17 August 2009 06:16:26 UTC