- Notifications
You must be signed in to change notification settings - Fork 749
Description
The descriptions of how CSS transforms affect scrollable overflow currently contain both (a) contradictions between specs (b) disagreements between specs and implementations and (c) lack of interoperability between implementations.
The overflow module has a definition of scrollable overflow that basically says that transformed elements are considered only at the transformed position when computing scrollable overflow. (This is considering only 2D transforms for now; there are some more interesting questions related to 3D transforms around both 3D scenes (as noted in the spec prose) and around perspective (see #3322).)
The transforms module, on the other hand, contains both the sentence:
Transforms affect the computation of the scrollable overflow region as described by [CSS-OVERFLOW-3].
and then later has the paragraph (which I strongly suspect is much older, but haven't checked):
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 scroll or 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.
The last sentence specifically says the opposite of what the algorithm in the overflow spec does -- this sentence says that transformed elements influence the overflow area from both their untransformed position and their transformed position.
So what do implementations do?
However, we can consider the conceptually more complicated (but physically simpler)
I don't think we have any specification text that explains the difference between these two scenarios, since I think we've generally avoided specifying that there's any anonymous box inside of a scrollable container. It's not clear to me how we would specify that difference.
We can then consider the additional Hello