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

Re: [css3] linear-gradient() proposal

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 3 Apr 2011 16:49:15 -0700
Message-ID: <BANLkTindLHSq9TfNf5MDd1bhUUCNBJB4Wg@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Andrew Fedoniouk <andrew.fedoniouk@live.com>, www-style@w3.org
On Sat, Apr 2, 2011 at 3:07 PM, Andrew Fedoniouk
<andrew.fedoniouk@live.com> wrote:
> I propose to change <linear-gradient> production defined here:
> http://dev.w3.org/csswg/css3-images/#linear-gradients
> to the following.
>
> Rendering of various linear gradients
> http://terrainformatica.com/w3/linear-gradient-proposal.png
> covered by the proposal. (There is a debug rendering there showing
> gradient vector used in each particular case.)
>
> The proposed linear-gradient() "function" is:
>
> <linear-gradient>
>   = linear-gradient( [<position>,] [<angle>,] <color-stop>[, <color-stop>]+
> );
>
> Where <position> is either one of these:
>
> a)     [top | bottom] || [left | right]
> b)     <length> [ <length> ]
> c)     <length> '/' <length> <length> '/' <length>

This is essentially what I had in an earlier draft, but it was deemed
to be too complicated.  My current design is the result of paring the
earlier draft's functionality down to a useful minimum.


> I also propose to limit color stops by using only percentages for defining
> stop offsets:
> <color-stop> = <color> [ <percentage> ]If it is possible to define
> explicitly start/end positions then lengths are not
> needed there.

I don't understand why this is desirable, even if we were to return
the previous, more complex, linear-gradient definition.  Defining
color-stop positions via lengths is convenient and simple.

~TJ
Received on Sunday, 3 April 2011 23:50:08 GMT

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