Skip to content

Commit 01fa65f

Browse files
committed
Resolve w3c#901
Define the impact of transforms on the computation of overflow more specifically.
1 parent 1adac82 commit 01fa65f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

css-transforms-1/Overview.bs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ Transforms apply to [=transformable elements=].
167167

168168
Note: Transformations do affect the visual rendering, but have no affect on the CSS layout other than affecting overflow. Transforms are also taken into account when computing client rectangles exposed via the Element Interface Extensions, namely <a href="https://www.w3.org/TR/cssom-view/#dom-element-getclientrects">getClientRects()</a> and <a href="https://www.w3.org/TR/cssom-view/#dom-element-getboundingclientrect">getBoundingClientRect()</a>, which are specified in [[CSSOM-VIEW]].
169169

170-
Issue(w3c/csswg-drafts#901): Overflow bounds that are computed at the end of layout can increase (but not decrease) by paint-level effects such as transforms.
171-
172170
<div class="example">
173171
<pre>
174172
div {
@@ -224,7 +222,7 @@ Note that an identical rendering can be obtained by nesting elements with the eq
224222
</pre>
225223
</div>
226224

227-
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 'overflow' property is ''overflow/scroll'' or ''overflow/auto'', scrollbars will appear as needed to see content that is transformed outside the visible area.
225+
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 'overflow' property is ''overflow/scroll'' or ''overflow/auto'', scrollbars will appear as needed to see content that is transformed outside the visible area. Specifically, transforms can extend (but do not shrink) the size of the overflow area, which is computed as the union of the bounds of the elements before and after the application of transforms.
228226

229227
For elements whose layout is governed by the CSS box model, any value other than ''transform/none'' for the transform results in the creation of a stacking context. Implementations must paint the layer it creates, within its parent stacking context, at the same stacking order that would be used if it were a positioned element with ‘z-index: 0’. If an element with a transform is positioned, the ‘z-index’ property applies as described in [[!CSS2]], except that ‘auto’ is treated as ‘0’ since a new stacking context is always created
230228

0 commit comments

Comments
 (0)