W3C home > Mailing lists > Public > www-style@w3.org > August 2009

Re: Gradient syntax proposal

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 14 Aug 2009 14:07:34 -0700
Message-ID: <4A85D216.8090306@inkedblade.net>
To: www-style@w3.org
Tab Atkins Jr. wrote:
> On Fri, Aug 14, 2009 at 3:47 PM, fantasai<fantasai.lists@inkedblade.net> wrote:
>> Brad Kemper wrote:
>>> 
>>> One of the things I really hate about using "<bg-position>, <bg-position>"
>>> is that comma to separate the two lengths or keywords on the left from those
>>> on the right. Since commas are already being used to separate color-stops,
>>> this just makes the whole thing harder to read, because they are no longer
>>> used consistently to group like things. When they are used only for
>>> color-stops, then you can see in a glance how many color-stops there are
>>> instead of having to study it more closely with a line full of distances and
>>> commas. For instance, I find the following very hard to read, and it
>>> probably doesn't even make sense (which is another problem with this kind of
>>> construction).
>>> |linear-gradient(10px 30%, 100% 4%, 50% green, 20% blue)|
>> I completely agree. How about using a keyword?
>>
>>  linear-gradient(10px 30% to 100% 4%, green, blue 20%, navy);
>>
>> For simpler cases you'd get
>>
>>  linear-gradient(left to right, green, blue, navy);
> 
> I like the "to" keyword for the <bg-position> construction!  It
> expresses the relationship very nicely.  Using it on the simpler
> construction is nice and literate, but sort of unnecessary; I think
> "linear-gradient(left, green, blue, navy)" is pretty clear?

Yes, I think it makes sense to allow that as a shortened version.

~fantasai
Received on Friday, 14 August 2009 21:08:19 GMT

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