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

Re: [css3-images] Changing the angles in gradients

From: Alan Gresley <alan@css-class.com>
Date: Thu, 19 May 2011 03:40:00 +1000
Message-ID: <4DD40470.9060603@css-class.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>, Robert O'Callahan <rocallahan@gmail.com>, Simon Fraser <smfr@me.com>
On 19/05/2011 3:06 AM, Tab Atkins Jr. wrote:
> On Tue, May 17, 2011 at 12:57 PM, Tab Atkins Jr.<jackalmage@gmail.com>  wrote:
>> So, we have three choices:
>> A) Keep the angles as they are, with 0deg=East and 90deg=North
>> B) Switch to screen-coord polar, with 0deg=East and 90deg=South
>> C) Switch to bearing angles, with 0deg=North and 90deg=East
> Based on the frankly overwhelming preference for C expressed in the
> various feedback channels, particularly the css3.info poll, I'll
> change the spec to use bearing angles.
> ~TJ

This thread is about angles for linear-gradient. What orientation is the 
gradient with a linear-gradient that has no angle declared? What does 
this default to?

<!doctype html>

div {
   height: 150px;
   width: 150px;
   border: 2px solid blue;
   background: -webkit-linear-gradient(orange, orange 75px, blue 75px, 
   background: -moz-linear-gradient(orange, orange 75px, blue 75px, blue);
   background: -ms-linear-gradient(orange, orange 75px, blue 75px, blue);


If it changes to C (0deg=North and 90deg=East), then the orange part of 
the gradient will face to the east. So instead of just changing the 
behavior of linear-gradient with angles, it will also change the 
behavior of linear-gradient with no angles declared.

Alan Gresley
Received on Wednesday, 18 May 2011 17:40:30 UTC

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