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

Re: [css4-images] Color stop syntax

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 21 Sep 2012 13:44:33 -0700
Message-ID: <CAAWBYDBswRt=vOxyH=SbJcbAE_OmvUiAEnrPAVzva6Fgt2MBtg@mail.gmail.com>
To: Lea Verou <lea@w3.org>
Cc: www-style list <www-style@w3.org>
On Fri, Sep 21, 2012 at 6:07 AM, Lea Verou <lea@w3.org> wrote:
> A few days ago, I gave a talk at SmashingConf, in which I included some
> small live demos with gradients. During one of them, I wrote something like:
>
> background: linear-gradient(1px black, 1px transparent);
>
> Neither I nor anyone in the 300 authors in the audience could see what was
> wrong with it, until I gave up and decided to move on to the next demo.
> Of course, I later realized what the problem was. The color stop position
> was before the color. But why is that disallowed? There doesn’t seem to be
> any reason to require it and traditionally in CSS order doesn’t matter when
> disambiguation is possible regardless of it.

Probably because I accidentally made it order-dependent early on, and
never thought to change it.  I don't see any particular reason to keep
it order-dependent - as you say, CSS traditionally lets us use any
order as long as it's unambiguous.

I'll go ahead and change it in the Images 4 ED.


> Also: Great idea to allow 2 positions. Hadn’t noticed it before. This was
> sorely needed for so many use cases!

I wouldn't call it "sorely needed" (it doesn't add any new abilities),
but it is indeed very convenient for doing stripes, which is a common
use-case.

~TJ
Received on Friday, 21 September 2012 20:45:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:00 GMT