<?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>15537</bug_id>
          
          <creation_ts>2012-01-12 20:51:19 +0000</creation_ts>
          <short_desc>skew() is not defined</short_desc>
          <delta_ts>2012-02-13 16:32:34 +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>smfr</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62613</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-01-12 20:51:19 +0000</bug_when>
    <thetext>&quot;&quot;&quot;
skew(&lt;angle&gt; [, &lt;angle&gt;])
specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie. no skew on the Y axis).
&quot;&quot;&quot;
http://dev.w3.org/csswg/css3-3d-transforms/#transform-functions

The link only says what skews mean along the X or Y axis separately, not together.  The intent seems to be that skew(x, y) is [1, tan(x), tan(y), 1, 0, 0], but this needs to be spelled out.  In particular, skew(x, y) is not the composition of skewX(x) and skewY(y), which would have been my first guess (they don&apos;t even commute).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63362</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-01-30 21:17:41 +0000</bug_when>
    <thetext>It looks like skew() got left out of the new spec entirely.  It should be re-added to the 2D Transformation Functions section -- all browsers support it interoperably.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63453</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser">smfr</who>
    <bug_when>2012-01-31 21:30:49 +0000</bug_when>
    <thetext>Checking in Overview.html;
/sources/public/csswg/css3-transforms/Overview.html,v  &lt;--  Overview.html
new revision: 1.18; previous revision: 1.17
done
Checking in Transforms.src.html;
/sources/public/csswg/css3-transforms/Transforms.src.html,v  &lt;--  Transforms.src.html
new revision: 1.21; previous revision: 1.20
done</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63535</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-01 16:46:59 +0000</bug_when>
    <thetext>The new definition appears to be

&quot;&quot;&quot;
specifies a skew transformation along the X axis by the angle specified in the first parameter, and a skew transformation along the Y axis by the angle specified in the second parameter. If the second parameter is not provided, it has a value of 0.
&quot;&quot;&quot;

(I wasn&apos;t able to see it at &lt;http://dev.w3.org/csswg/css3-transforms/&gt;, but I got it from CVS.)  This does not match what browsers do, as far as I can tell.  For instance, skew(45deg, 45deg) results in a matrix of [1, 1, 1, 1, 0, 0], which does not correspond to any combination of skewX() and skewY() -- it&apos;s singular, while skewX() and skewY() are never singular (and therefore neither is their composition).  You should define it directly in terms of a matrix, as I say in comment #0: skew(x, y) is [1, tan(y), tan(x), 1, 0, 0].  (I had tan(y) and tan(x) reversed in comment #0, but I just checked my tests and what I write in this comment is correct.)

I should also reiterate that skewX() and skewY() don&apos;t commute, so defining skew() as their composition without specifying an order wouldn&apos;t even make sense.


Example of skew() not agreeing with skewX() skewY() not agreeing with skewY() skewX():

data:text/html,&lt;!doctype html&gt;
&lt;div style=&quot;background:blue;height:100px;width:100px;
transform:skew(45deg,45deg)&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;background:green;height:100px;width:100px;
transform:skewX(45deg) skewY(45deg)&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;background:orange;height:100px;width:100px;
transform:skewY(45deg) skewX(45deg)&quot;&gt;&lt;/div&gt;

Notice how the first box disappears entirely (the transform is singular), and the second two boxes are transformed differently (skewX() and skewY() don&apos;t commute).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63541</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser">smfr</who>
    <bug_when>2012-02-01 18:06:26 +0000</bug_when>
    <thetext>Fixed. The new text is at http://dev.w3.org/csswg/css3-transforms/ (which works just fine for me).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63542</commentid>
    <comment_count>5</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-01 18:10:39 +0000</bug_when>
    <thetext>Looks good to me.  It seems I needed to do a hard refresh -- the page is served with unwarranted caching headers (Cache-Control: max-age=172800).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64011</commentid>
    <comment_count>6</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-02-13 05:53:08 +0000</bug_when>
    <thetext>Hello Aryeh. I linked skew, skewX and skewY to the new mathematical description section. Can you verify that the math is correct please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64033</commentid>
    <comment_count>7</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-13 16:32:34 +0000</bug_when>
    <thetext>Yep, the new definition is good.  Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>