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

Re: [CSS3] linear-gradient() proposal

From: Simon Fraser <smfr@me.com>
Date: Sun, 27 Mar 2011 13:31:52 -0700
Cc: www-style@w3.org
Message-id: <76856724-AEAA-4EA9-984E-8903B30B8B28@me.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
On Mar 26, 2011, at 10:15 pm, Andrew Fedoniouk wrote:

> Following is about changes in the linear-gradient() function:
> http://dev.w3.org/csswg/css3-images/#linear-gradients
> 
> Existing schema of computing angled gradients
> http://dev.w3.org/csswg/css3-images/gradient-diagram.png
> has one problem.
> 
> Consider this element:
> div
> {
>  width:100%; height:100px;
>  background: linear-gradient(45deg, red, yellow, green, blue, magenta);
> }
> 
> If to use current spec. then "gradient length" (distance between start and end
> along gradient beam) changes when width of the DIV changes.
> That is not expected and not desirable effect. Angled gradients are
> known to be stable to dimension changes.

The current behavior was chosen because it was suggested that authors
normally want and expect simple "cover the box with the gradient" behavior.

Simon
Received on Sunday, 27 March 2011 20:33:18 GMT

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