<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15598</bug_id>
          
          <creation_ts>2012-01-17 19:35:22 +0000</creation_ts>
          <short_desc>0 needs to be allowed wherever we allow &lt;angle&gt;</short_desc>
          <delta_ts>2012-02-13 16:48:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Transforms</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aryeh Gregor">ayg</reporter>
          <assigned_to name="Simon Fraser">smfr</assigned_to>
          <cc>cmarrin</cc>
    
    <cc>dino</cc>
    
    <cc>dschulze</cc>
    
    <cc>eoconnor</cc>
    
    <cc>jackalmage</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62815</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-01-17 19:35:22 +0000</bug_when>
    <thetext>In all implementations tested (IE9, Firefox 12.0a1, Chrome 17 dev, Opera Next 12.00 alpha), using 0 for an &lt;angle&gt; 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 &quot;0&quot; as &lt;angle&gt;:

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 &lt;angle&gt; -- Values and Units is not going to be changed to allow 0 for &lt;angle&gt; the way it&apos;s allowed for &lt;length&gt;.  Perhaps after the text

&quot;&quot;&quot;
In this list the type &lt;translation-value&gt; is defined as a &lt;length&gt; or &lt;percentage&gt; value, and the &lt;angle&gt; type is defined by CSS Values and Units.
&quot;&quot;&quot;

we could add something like

&quot;&quot;&quot;
Wherever &lt;angle&gt; is used in this specification, a &lt;number&gt; that is equal to zero is also allowed, which is treated the same as an angle of zero degrees.
&quot;&quot;&quot;

(This affects all three of the transforms specs, but I&apos;m filing against only CSS Transforms to avoid duplication.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63109</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser">smfr</who>
    <bug_when>2012-01-25 18:21:58 +0000</bug_when>
    <thetext>Done once i commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63410</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-01-31 17:49:51 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; I spoke with Tab Atkins, and he said the Transforms spec needs to be changed to
&gt; explicitly allow 0 whereever it allows &lt;angle&gt; -- Values and Units is not going
&gt; to be changed to allow 0 for &lt;angle&gt; the way it&apos;s allowed for &lt;length&gt;. 

Why isn&apos;t it allowed? 0deg, 0rad, 0grad, 0turn equals no rotation at all. Seems to be inconsistent for me. Where else do we use &lt;angle&gt; where 0 can&apos;t work?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63416</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-01-31 18:35:15 +0000</bug_when>
    <thetext>The problem is if you have a syntax that accepts both &lt;length&gt; and &lt;angle&gt; 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 &lt;length-with-unit&gt;/&lt;angle-with-unit&gt; 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 &lt;number&gt; as well as long as it evaluates to 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63977</commentid>
    <comment_count>4</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-02-11 16:23:55 +0000</bug_when>
    <thetext>Simon fixed that already:

&quot;Wherever &lt;angle&gt; is used in this specification, a &lt;number&gt; that is equal to zero is also allowed, which is treated the same as an angle of zero degrees.&quot;

 I close the bug for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64038</commentid>
    <comment_count>5</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-13 16:48:06 +0000</bug_when>
    <thetext>Looks good, thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>