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
[css-transforms-2] Define that backgrounds/borders/decorations of element establishing 3D Rendering Context are rendered at z=0 in its 3D scene.
This defines that backgrounds, borders, and other box decorations of an
element establishing a 3D Rendering Context are rendered at z=0 in its
3D scene, rather than behind its 3D scene.
This matches the current behavior of Chromium and Gecko. While WebKit
implements the spec as written, it also doesn't match the current spec's
definition of 3D Rendering Contexts that covers up the difference, so
implementing the spec as written today may not be web-compatible.
Tests in web-platform-tests/wpt#31375 ,
particularly -004 (although -005 is more relevant to WebKit).
Fixes#6238.
Copy file name to clipboardExpand all lines: css-transforms-2/Overview.bs
+9-5
Original file line number
Diff line number
Diff line change
@@ -327,16 +327,19 @@ Issue: Figure out what the current behavior of various engines is, and figure ou
327
327
The rendering of elements in a 3D rendering context is as follows (numbers refer to items in <a href="https://www.w3.org/TR/CSS2/zindex.html#painting-order">CSS 2.1, Appendix E, Section E.2 Painting Order</a>):
328
328
329
329
<ol style="list-style-type: upper-alpha;">
330
-
<li>The background, borders and other box decorations of the establishing element are rendered (steps 1 and 2)
331
-
<li>The content and descendant elements without 3D transforms, ordered according to steps 3—7, are rendered into a plane at z=0 relative to the establishing element.
330
+
<li>The background, borders, other box decorations, and content of the establishing element, and its descendant elements without 3D transforms, ordered according to steps 1—7, are rendered into a plane at z=0 relative to the establishing element.
332
331
<li>3D-transformed elements are each rendered into their own plane, transformed by the <a href="#accumulated-3d-transformation-matrix-computation">accumulated 3D transformation matrix</a>.
333
-
<li>Intersection is performed between the set of planes generated by steps B and C, according to <a href="http://en.wikipedia.org/wiki/Newell%27s_algorithm">Newell's algorithm</a>.
334
-
<li>The resulting set of planes is rendered on top of the backgrounds and box decorations rendered in this step A. Coplanar [=3D transformed elements=] are rendered in painting order.
332
+
<li>Intersection is performed between the set of planes generated by steps A and B, according to <a href="http://en.wikipedia.org/wiki/Newell%27s_algorithm">Newell's algorithm</a>. Coplanar [=3D transformed elements=] are rendered in painting order.
335
333
</ol>
336
334
337
335
Issue: is it OK to not pop 2D-transformed elements into their own planes?
338
336
339
-
Issue: requiring intersection with non-transformed content and descendants requires UAs to allocate additional textures (possibly doubling memory use). Would be more efficient to simply render content and untransformed descendants along with background and borders.
337
+
Note: This specification previously defined that
338
+
the background, borders, and other box decorations of the establishing element
339
+
were rendered behind the entire 3D scene.
340
+
This was changed in <a href="https://github.com/w3c/csswg-drafts/issues/6238">#6238</a>.
341
+
However, if the definition of 3D Rendering Contexts is changed in the future,
342
+
it may be worth considering changing back.
340
343
341
344
Note that elements with transforms which have a negative z-component will render behind the content and untransformed descendants of the establishing element, and that [=3D transformed elements=] may interpenetrate with content and untransformed elements.
342
345
@@ -1434,6 +1437,7 @@ Recent Changes</h3>
1434
1437
<ul>
1435
1438
<li>The specification no longer requires maintaining state for whether individual transform properties have 2D or 3D values, but instead requires that any value that can be expressed as 2D is treated as 2D (see <a href="https://github.com/w3c/csswg-drafts/issues/3305">#3305</a>).</li>
1436
1439
<li>The 'scale' property and ''scale()'', ''scaleX()'' and ''scaleY()'' functions now support percentages (see <a href="https://github.com/w3c/csswg-drafts/issues/3399">#3399</a>).</li>
1440
+
<li>Define that borders, backgrounds, and box decorations of an element establishing a 3D Rendering Context are rendered at z=0 in its 3D scene, rather than behind its 3D scene (see <a href="https://github.com/w3c/csswg-drafts/issues/6238">#6238</a>).</li>
1437
1441
<li>Define that paint containment is a grouping property (see <a href="https://github.com/w3c/csswg-drafts/issues/6202">#6202</a>).</li>
1438
1442
<li>Add support for a ''perspective()/none'' argument to ''perspective()'' (see <a href="https://github.com/w3c/csswg-drafts/issues/6488">#6488</a>).</li>
1439
1443
<li>Define that clamping of values of ''perspective()'' also applies to resolved values and interpolation (see <a href="https://github.com/w3c/csswg-drafts/issues/6320">#6320</a> and <a href="https://github.com/w3c/csswg-drafts/issues/6346">#6346</a>).</li>
0 commit comments