W3C home > Mailing lists > Public > www-style@w3.org > June 2011

Re: [CSS3] support for linear-gradients & radial-gradients

From: Alan Gresley <alan@css-class.com>
Date: Sat, 25 Jun 2011 03:49:31 +1000
Message-ID: <4E04CE2B.5040103@css-class.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style@w3.org
On 9/02/2011 4:44 PM, Tab Atkins Jr. wrote:
> On Tue, Feb 8, 2011 at 5:45 PM, Alan Gresley<alan@css-class.com>  wrote:

>> Something like this perhaps.
>>
>>
>> linear-gradient(left rgba(255,255,0,1), 50% rgba(127,127,63,0.5),
>> rgba(0,0,0,0))
>
> Yup, something like that.
>
> ~TJ


To be precise, this is what has to be done.


linear-gradient(left, yellow, rgba(127,127,0,0.5) 50%, 
rgba(64,64,0,0.25) 75%, rgba(32,32,0,0.125) 87.5%, rgba(16,16,0,0.0625) 
93.75%, rgba(8,8,0,0.03125) 96.875%, rgba(4,4,0,0.015625) 98.4375%, 
rgba(0,0,0,0))


I presume you understand the maths above and I was able to intuit how to 
achieve such a gradient but I do believe that such a method to create 
such a gradient should also be given as an example in the spec since 
most authors would not know that such gradients are possible when the 
changes are made in browsers to match IE10 behavior or even know how to 
do the maths.


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Friday, 24 June 2011 17:50:05 GMT

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