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

Re: Gradient syntax proposal

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 19 Aug 2009 11:37:12 -0700
Message-Id: <1E69E0A1-F24E-4B9F-8CBE-7A03425720F8@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Aug 19, 2009, at 10:41 AM, fantasai <fantasai.lists@inkedblade.net>  

> Brad Kemper wrote:
>> On Aug 17, 2009, at 8:15 PM, Tab Atkins Jr. wrote:
>>> Also, if you haven't seen it in a while, I've upgraded the CSS on my
>>> document viewer (from "none" to "some"), so it's actually halfway
>>> pleasant to read now.
>>> http://www.xanthir.com/document/document.php? 
>>> id= 
>>> d65df9d10442ef96c2dfe5e1d7bbebf7aa42f2bcf24e68fc3777c4b484fa8a4ce55fed2189cac20ccad8686127f4c08917c4ca8b7614e9f89c2a950ec083a9c6

>> In your last example, you could get about the same gradient with  
>> this:
>> |background: linear-gradient(-70deg / yellow 52px, blue (100% -  
>> 52px));|
>> ...if that was the effect you wanted, and you didn't have the extra  
>> (and I would say unneeded) grammar of bg-position.
>> My point is, it's cleaner and simpler not to have several different  
>> ways to do the same thing. Simpler to learn, simpler to read,  
>> avoids confusion about the different forms.
>> I suggest we have a second slash for when people want to measure  
>> from the apposing corner/side. So that the above could be written as:
>> |background: linear-gradient(-70deg / yellow 52px / blue 52px);|
>> ([<angle> | <side-or-corner>] / <color> <distance-or-%-from-start>  
>> [,<color> <distance-or-%-from-start>]* [/ <color> <distance-or-%- 
>> from-end> [,<color> <distance-or-%-from-end>]*]?)
> I think that's really confusing.

To me it seems simpler and clearer than putting a bunch of calc() math  
into it. But if calc() is your thing, you could still use it when you  
need to set color stops based on the end of the gradient. You wouldn't  
be required to do things the easy way. 
Received on Wednesday, 19 August 2009 18:37:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:28 UTC