You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Specifying a value other than <spanclass=cssdata-link-type=maybetitle=none>none</span> for the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> property establishes a new <adata-link-type=dfnhref=#local-coordinate-systemtitle="local coordinate system">local coordinate system</a> at the element that it is applied to. The mapping from where the element would have rendered into that local coordinate system is given by the element’s <adata-link-type=dfnhref=#transformation-matrixtitle="transformation matrix">transformation matrix</a>. Transformations are cumulative. That is, elements establish their local coordinate system within the coordinate system of their parent. From the perspective of the user, an element effectively accumulates all the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> properties of its ancestors as well as any local transform applied to it. The accumulation of these transforms defines a <adata-link-type=dfnhref=#current-transformation-matrix-ctmtitle="current transformation matrix (ctm)">current transformation matrix (CTM)</a> for the element.
304
+
<p>Specifying a value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> for the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> property establishes a new <adata-link-type=dfnhref=#local-coordinate-systemtitle="local coordinate system">local coordinate system</a> at the element that it is applied to. The mapping from where the element would have rendered into that local coordinate system is given by the element’s <adata-link-type=dfnhref=#transformation-matrixtitle="transformation matrix">transformation matrix</a>. Transformations are cumulative. That is, elements establish their local coordinate system within the coordinate system of their parent. From the perspective of the user, an element effectively accumulates all the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> properties of its ancestors as well as any local transform applied to it. The accumulation of these transforms defines a <adata-link-type=dfnhref=#current-transformation-matrix-ctmtitle="current transformation matrix (ctm)">current transformation matrix (CTM)</a> for the element.
305
305
306
306
<p>The coordinate space is a coordinate system with two axes: the X axis increases horizontally to the right; the Y axis increases vertically downwards. Three-dimensional transform functions extend this coordinate space into three dimensions, adding a Z axis perpendicular to the plane of the screen, that increases towards the viewer.
<p>For elements whose layout is governed by the CSS box model, the transform property does not affect the flow of the content surrounding the transformed element. However, the extent of the overflow area takes into account transformed elements. This behavior is similar to what happens when elements are offset via relative positioning. Therefore, if the value of the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-overflow-3/#overflowtitle=overflow>overflow</a> property is <spanclass=cssdata-link-type=maybetitle=scroll>scroll</span> or <spanclass=cssdata-link-type=maybetitle=auto>auto</span>, scrollbars will appear as needed to see content that is transformed outside the visible area.
377
377
378
-
<p>For elements whose layout is governed by the CSS box model, any value other than <spanclass=cssdata-link-type=maybetitle=none>none</span> for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants.
378
+
<p>For elements whose layout is governed by the CSS box model, any value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants.
Is this effect on <aclass="css css-code" data-link-type=propertyhref=http://dev.w3.org/csswg/css-position-3/#positiontitle=position>position: fixed</a> necessary? If so, need to go into more detail here about why fixed positioned objects should do this, i.e., that it’s much harder to implement otherwise. See <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328">Bug 16328</a>.
<p>A transformation is applied to the coordinate system an element renders in through the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> property. This property contains a list of <ahref=#transform-functions>transform functions</a>. The final transformation value for a coordinate system is obtained by converting each function in the list to its corresponding matrix like defined in <ahref=#mathematical-description>Mathematical Description of Transform Functions</a>, then multiplying the matrices.
747
747
748
748
<tableclass=propdef><tr><th>Name:<td><dfnclass=css-codedata-dfn-type=propertydata-export="" id=propdef-transform>transform<aclass=self-linkhref=#propdef-transform></a></dfn><tr><th>Value:<td>none | <aclass="production css-code" data-link-type=typehref=#typedef-transform-listtitle="<transform-list>"><transform-list></a><tr><th>Initial:<td>none<tr><th>Applies to:<td><adata-link-type=dfnhref=#transformable-elementtitle="transformable elements">transformable elements</a><tr><th>Inherited:<td>no<tr><th>Media:<td>visual<tr><th>Computed value:<td>As specified, but with relative lengths converted into absolute lengths.<tr><th>Percentages:<td>refer to the size of <adata-link-type=dfnhref=#bounding-boxtitle="bounding box">bounding box</a><tr><th>Animatable:<td>as <ahref=#interpolation-of-transforms>transform</a></table>
749
-
<p>Any computed value other than <spanclass=cssdata-link-type=maybetitle=none>none</span> for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants.
749
+
<p>Any computed value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants.
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-overflow-3/#overflowtitle=overflow>overflow</a>: any value other than <spanclass=cssdata-link-type=maybetitle=visible>visible</span>.</li>
854
-
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/filters/#effectstitle=filter>filter</a>: any value other than <spanclass=cssdata-link-type=maybetitle=none>none</span>.</li>
854
+
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/filters/#effectstitle=filter>filter</a>: any value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a>.</li>
855
855
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#ClipPropertytitle=clip>clip</a>: any value other than <spanclass=cssdata-link-type=maybetitle=auto>auto</span>.</li>
856
-
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#clip-pathtitle=clip-path>clip-path</a>: any value other than <spanclass=cssdata-link-type=maybetitle=none>none</span>.</li>
856
+
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#clip-pathtitle=clip-path>clip-path</a>: any value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a>.</li>
857
857
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/compositing-1/#propdef-isolationtitle=isolation>isolation</a>: used value of <spanclass=cssdata-link-type=maybetitle=isolate>isolate</span>.</li>
858
-
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#mask-imagetitle=mask-image>mask-image</a>: any value other than <spanclass=cssdata-link-type=maybetitle=none>none</span>.</li>
859
-
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#mask-box-image-sourcetitle=mask-box-image-source>mask-box-image-source</a>: any value other than <spanclass=cssdata-link-type=maybetitle=none>none</span>.</li>
858
+
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#mask-imagetitle=mask-image>mask-image</a>: any value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a>.</li>
859
+
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/masking/#mask-box-image-sourcetitle=mask-box-image-source>mask-box-image-source</a>: any value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a>.</li>
860
860
<li><aclass=propertydata-link-type=propdeschref=http://dev.w3.org/fxtf/compositing-1/#propdef-mix-blend-modetitle=mix-blend-mode>mix-blend-mode</a>: any value other than <spanclass=cssdata-link-type=maybetitle=normal>normal</span>.</li>
<p>If the value is <spanclass=cssdata-link-type=maybetitle=none>none</span>, no perspective transform is applied. Lengths must be positive.
890
+
<p>Where <aclass="production css-code"data-link-type=typehref=http://dev.w3.org/csswg/css-values-3/#length-valuetitle="<length>"><length></a> values must be positive.
891
891
892
-
<p>The use of this property with any value other than <spanclass=cssdata-link-type=maybetitle=none>none</span> establishes a stacking context. It also establishes a containing block (somewhat similar to <aclass="css css-code" data-link-type=propertyhref=http://dev.w3.org/csswg/css-position-3/#positiontitle=position>position: relative</a>), just like the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> property does.
Distance to the center of projection. <spanclass=issueid=issue-1ded4de8><aclass=self-linkhref=#issue-1ded4de8></a>Verify that projection is the distance to the center of projection.</span>
No perspective transform is applied. The effect is mathematically similar to an infinite <aclass="production css-code" data-link-type=typehref=http://dev.w3.org/csswg/css-values-3/#length-valuetitle="<length>"><length></a> value. All objects appear to be flat on the canvas.
900
+
</dd>
901
+
</dl>
902
+
903
+
<p>The use of this property with any value other than <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> establishes a stacking context. It also establishes a containing block (somewhat similar to <aclass="css css-code" data-link-type=propertyhref=http://dev.w3.org/csswg/css-position-3/#positiontitle=position>position: relative</a>), just like the <aclass=propertydata-link-type=propdeschref=#propdef-transformtitle=transform>transform</a> property does.
893
904
894
905
<p>The values of the <aclass=propertydata-link-type=propdeschref=#propdef-perspectivetitle=perspective>perspective</a> and <aclass=propertydata-link-type=propdeschref=#propdef-perspective-origintitle=perspective-origin>perspective-origin</a> properties are used to compute the <adata-link-type=dfnhref=#perspective-matrixtitle="perspective matrix">perspective matrix</a>, as described above.
If one of the <em>from-</em> or <em>to-transforms</em> is <spanclass=cssdata-link-type=maybetitle=none>none</span>.
1565
+
If one of the <em>from-</em> or <em>to-transforms</em> is <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a>.
1555
1566
<ul>
1556
1567
<li>
1557
-
The value <spanclass=cssdata-link-type=maybetitle=none>none</span> is replaced by an equivalent <adata-link-type=dfnhref=#identity-transform-functiontitle="identity transform function">identity transform function</a> list for the corresponding transform function list. Both transform function lists get interpolated following the next rule.
1568
+
The value <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> is replaced by an equivalent <adata-link-type=dfnhref=#identity-transform-functiontitle="identity transform function">identity transform function</a> list for the corresponding transform function list. Both transform function lists get interpolated following the next rule.
1558
1569
</li>
1559
1570
</ul>
1560
1571
<divclass=example>
1561
1572
<p>
1562
-
For example, if <em>from-transform</em> is <spanclass=cssdata-link-type=maybetitle=scale(2)>scale(2)</span> and <em>to-transform</em> is <spanclass=cssdata-link-type=maybetitle=none>none</span> then the value <spanclass=cssdata-link-type=maybetitle=scale(1)>scale(1)</span> will be used for <em>to-transform</em> and animation will proceed using the next rule. Similarly, if <em>from-transform</em> is <spanclass=cssdata-link-type=maybetitle=none>none</span> and <em>to-transform</em> is <spanclass=cssdata-link-type=maybetitle="scale(2) rotate(50deg)">scale(2) rotate(50deg)</span> then the animation will execute as if <em>from-transform</em> is <spanclass=cssdata-link-type=maybetitle="scale(1) rotate(0)">scale(1) rotate(0)</span>.
1573
+
For example, if <em>from-transform</em> is <spanclass=cssdata-link-type=maybetitle=scale(2)>scale(2)</span> and <em>to-transform</em> is <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> then the value <spanclass=cssdata-link-type=maybetitle=scale(1)>scale(1)</span> will be used for <em>to-transform</em> and animation will proceed using the next rule. Similarly, if <em>from-transform</em> is <aclass=cssdata-link-type=maybehref=#nonetitle=none>none</a> and <em>to-transform</em> is <spanclass=cssdata-link-type=maybetitle="scale(2) rotate(50deg)">scale(2) rotate(50deg)</span> then the animation will execute as if <em>from-transform</em> is <spanclass=cssdata-link-type=maybetitle="scale(1) rotate(0)">scale(1) rotate(0)</span>.
<pclass=issue>Keyword description missing. Description of flattening behavior is missing. Does rendering operate in <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-position-3/#z-indextitle=z-index>z-index</a> order? Do we still create a 3D context and let planes intersect? See <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=22427">Bug 22427</a><ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=23015">Bug 23015</a>.<ahref=#issue-0f144852> ↵ </a></p>
2399
2411
2400
-
<pclass=issue>Backface-visibility cannot be tested by only looking at m33. See <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=23014">Bug 23014</a>.<ahref=#issue-1b6023b0> ↵ </a></p>
2412
+
<spanclass=issue>Verify that projection is the distance to the center of projection.<ahref=#issue-1ded4de8> ↵ </a></span>
2413
+
<pclass=issue>Backface-visibility cannot be tested by only looking at m33. See <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=23014">Bug 23014</a>.<ahref=#issue-1b6023b0> ↵ </a></p>
2401
2414
2402
2415
<pclass=issue>Use different algorithm for interpolation of 2D matrices. See <ahref="https://www.w3.org/Bugs/Public/show_bug.cgi?id=17017">Bug 17017</a>.<ahref=#issue-9abd49cc> ↵ </a></p>
Animatable: as <ahref="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a>
875
875
</pre>
876
876
877
-
If the value is ''none'', no perspective transform is applied. Lengths must be positive.
877
+
Where <<length>> values must be positive.
878
+
879
+
<dldfn-for="perspective">
880
+
<dt><<length>></dt>
881
+
<dd>
882
+
Distance to the center of projection. <spanclass="issue">Verify that projection is the distance to the center of projection.</span>
883
+
</dd>
884
+
<dt><dfn>none</dfn></dt>
885
+
<dd>
886
+
No perspective transform is applied. The effect is mathematically similar to an infinite <<length>> value. All objects appear to be flat on the canvas.
887
+
</dd>
888
+
</dl>
878
889
879
890
The use of this property with any value other than ''none'' establishes a stacking context. It also establishes a containing block (somewhat similar to ''position: relative''), just like the 'transform' property does.
0 commit comments