This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In all implementations tested (IE9, Firefox 12.0a1, Chrome 17 dev, Opera Next 12.00 alpha), using 0 for an <angle> works fine: rotate(0), skewX(0), skewY(0), rotate3d(1,1,1,0), rotateX(0), rotateY(0), rotateZ(0), and skew(0,0) all are treated as the identity matrix, not a parse error. CSS Values and Units does not allow "0" as <angle>: http://dev.w3.org/csswg/css3-values/#angles I spoke with Tab Atkins, and he said the Transforms spec needs to be changed to explicitly allow 0 whereever it allows <angle> -- Values and Units is not going to be changed to allow 0 for <angle> the way it's allowed for <length>. Perhaps after the text """ In this list the type <translation-value> is defined as a <length> or <percentage> value, and the <angle> type is defined by CSS Values and Units. """ we could add something like """ Wherever <angle> is used in this specification, a <number> that is equal to zero is also allowed, which is treated the same as an angle of zero degrees. """ (This affects all three of the transforms specs, but I'm filing against only CSS Transforms to avoid duplication.)
Done once i commit.
(In reply to comment #0) > I spoke with Tab Atkins, and he said the Transforms spec needs to be changed to > explicitly allow 0 whereever it allows <angle> -- Values and Units is not going > to be changed to allow 0 for <angle> the way it's allowed for <length>. Why isn't it allowed? 0deg, 0rad, 0grad, 0turn equals no rotation at all. Seems to be inconsistent for me. Where else do we use <angle> where 0 can't work?
The problem is if you have a syntax that accepts both <length> and <angle> in the same place, and 0px does not have the same meaning as 0deg. Personally I think such syntax is confusing anyway and should be avoided on those grounds, and if someone wants to do it we can have <length-with-unit>/<angle-with-unit> or something to get rid of the grammatical ambiguity. But the Values and Units editors apparently disagree with me and will leave their spec as-is, so we have to make it explicit in our spec that we allow <number> as well as long as it evaluates to 0.
Simon fixed that already: "Wherever <angle> is used in this specification, a <number> that is equal to zero is also allowed, which is treated the same as an angle of zero degrees." I close the bug for now.
Looks good, thanks.