Re: unitless angles (and times and frequencies) [css3-2d-transforms][css3-3d-transforms][css3-images]

On Nov 5, 2009, at 5:42 am, Giovanni Campagna wrote:

>>
> Angles can be used only in rotate / skew.
> rotate(0), rotateX(0), rotateY(0), rotateZ(0), rotate3d(x,y,z,0),
> skewX(0) and skewY(0) are all identity transforms, so I guess they're
> not used much

Actually they are, to specify the initial state of transitions or  
animations
when you want the end state to have a matching list of transform  
functions
so that you don't fall into the "matrix decomposition" path for  
animations.

See
<http://www.w3.org/TR/2009/WD-css3-2d-transforms-20090320/#animation>

> the only difference is in skew(0,y) or skew(x,0), which could be
> replaced by appropriate skewX / skewY
>
> IHMO, allowing unit-less angles in transforms and only in transforms
> would introduce additional complexity on implementers without any
> clear advantage to authors, that would use 0rad or 0deg anyway, for
> consistency with the rest of CSS

I disagree; there's very little additional complexity (in WebKit at  
least).
The decision to allow unitless 0 is made per property.

Simon

Received on Thursday, 5 November 2009 15:00:35 UTC