Re: [CSS3] linear-gradient() proposal

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 UTC