This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29413 - Allow unitless 0 as a valid rotation value
Summary: Allow unitless 0 as a valid rotation value
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Fraser
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-31 23:07 UTC by Simon Fraser
Modified: 2017-01-13 17:39 UTC (History)
7 users (show)

See Also:


Attachments

Description Simon Fraser 2016-01-31 23:07:09 UTC
Need to allow unitless 0 as an argument to rotation functions.
Comment 1 Simon Fraser 2016-01-31 23:22:10 UTC
Maybe no need to change this if Values and Units changes to allow unitless 0 for angles, as just resolved.
Comment 2 Roman Dvornov 2016-12-21 10:52:27 UTC
> Maybe no need to change this if Values and Units changes to allow unitless 0 for angles, as just resolved.

Unitless zero for angles is allowed by CSS2.2 and CSS Values and Units Module Level 3

https://www.w3.org/TR/CSS22/aural.html#angles
> Like for <length>, the unit may be omitted, if the value is zero: '0deg' may be written as '0'.

https://www.w3.org/TR/css-values-3/#angles
> ... However, for zero angles the unit identifier is optional (i.e. can be syntactically represented as the number 0). ...

Also spec has it's own <angle> definition (influenced by SVG) and it's confusing.
https://www.w3.org/TR/css-transforms-1/#svg-angle
> An angle can be a <number> without an unit identifier. In this case the number gets interpreted as a value in degrees.

I think, the last one should be a separate issue.
Comment 3 Roman Dvornov 2016-12-21 11:08:09 UTC
My bad, the <angle> definition in the spec is about values in `transform` atrribute on SVG elements. So it doesn't affect <angle> definition for CSS.

Also I found that the spec says (https://www.w3.org/TR/css-transforms-1/#transform-functions):

> ... 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.

That's equivalent to CSS2.2 and Values and Units Module. Looks like issue is resolved.
Comment 4 Simon Fraser 2017-01-13 17:39:24 UTC
CSS WG resolved that unitless 0 was OK everywhere.