Re: Linear gradients, Transforms and angles...

Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote Mon, 20  
Sep 2010 10:36:36 +0200

>> Guys, I have a (light) problem with gradients and transformations.
>> An angle is not an angle...
>>
>> - linear gradients' angles are counted counter-clockwise [1]
>>
>> - rotations are counted clockwise [2]

I'd prefer to follow textbook conventions, though inconsistent. At this  
point, however, I'd be happy just to get consensus. Implementation cost is  
virtually unaffected, no?

In particular, Tab and fantasai, please don't let this issue delay the  
next Editor's Draft (with the planned syntax changes).


Much later, David Singer <singer@apple.com> wrote Thu, 23 Sep 2010  
18:40:25 +0200

> Either way we decide, we'll probably need a note, by the way.  "Warning,  
> linear gradient angles in CSS are specified in the CSS coordinate system  
> in which the Y axis is downwards, and hence a 45º gradient also goes  
> downward from the horizontal."  "Warning, linear gradient angles are  
> specified in CSS on a different coordinate system from the rest of the  
> specification; a 45º gradient goes upward, away from the Y axis, which  
> goes downward, and a 45º gradient and a 45º rotation are therefore at  
> 90º to each other."

Agreed. Considering the volume and vigor of discussion on this list, it's  
worth mentioning in the spec. Otherwise we'll get a volume of vigorous  
e-mails in the coming years.

-- 
Leif Arne Storset
Core Technology Developer, Opera Software
Oslo, Norway

Received on Friday, 24 September 2010 09:25:40 UTC