W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: [css4-images] One color stop should now be allowed

From: Rik Cabanier <cabanier@gmail.com>
Date: Mon, 5 Nov 2012 17:47:52 -0800
Message-ID: <CAGN7qDB3WmSogt3e7EbsBi57Suap9q-qYF42CM2Ozo6PW_tQGA@mail.gmail.com>
To: Lea Verou <lea@w3.org>
Cc: www-style list <www-style@w3.org>
I agree that it makes sense for editors and it's easy to implement. In
addition, it matches canvas and SVG behavior.
Canvas also specifies what happens if there are no color stops. Does that
case make sense for CSS?


On Mon, Nov 5, 2012 at 11:05 AM, Lea Verou <lea@w3.org> wrote:

> Since we can now have two positions per color stop [1], which is
> equivalent to two color stops with the older syntax, gradients should
> permit one color stop only. Grammar-wise, it's only a matter of converting
> a few +s to *s.
> In case the only color stop doesn't include two positions, it could be
> defined as equivalent to having 0% 100%. Yes, this is essentially identical
> to using image(color), but:
> 1. There is no serious reason to disallow degenerate applications of any
> CSS feature and few other CSS features do.
> 2. It ensures consistency and matches author expectations.
> 3. Good educational value: People who use editors that live update will be
> able to see what they're doing before they even type the second color.
> Instant feedback is an age-old UI principle and syntax is the UI of the
> language.
> 4. It's trivial to implement.
> [1]: http://www.w3.org/TR/css4-images/#color-stop-syntax
> Lea Verou
> W3C developer relations
> http://w3.org/people/all#leahttp://lea.verou.me ✿ @leaverou
Received on Tuesday, 6 November 2012 01:48:20 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:21 UTC