[csswg-drafts] [css-overflow][css-transforms] Define how perspective transform interacts with scrollable overflow area (#8193)

johannesodland has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-overflow][css-transforms] Define how perspective transform interacts with scrollable overflow area ==


[css-overflow-3](https://www.w3.org/TR/css-overflow-3/#scrollable) defines the interaction of transformed boxes on the scrollable overflow area as follows:
> The border boxes of all boxes for which it is the containing block and whose border boxes are positioned not wholly outside its [block-start](https://www.w3.org/TR/css-writing-modes-4/#block-start) or [inline-start](https://www.w3.org/TR/css-writing-modes-4/#inline-start) padding edges, accounting for transforms by projecting each box onto the plane of the element that establishes its [3D rendering context](https://www.w3.org/TR/css-transforms-2/#3d-rendering-context). [[CSS3-TRANSFORMS]](https://www.w3.org/TR/css-overflow-3/#biblio-css3-transforms) 

The module does not define how perspective transforms and scroll position affect the scrollable overflow area. 

When perspective transforms are used on a scroll-container, the projection of the border boxes onto the plane depends on the scroll position. 


### Example: 
Given a scroll container with a perspective projection and an existing scrollable overflow area in the block axis (generated by contained line boxes or grid items all positioned at z=0).

The scroll container is scrolled to the start position.

Add an absolutely positioned box in the foreground (transformed by a positive z-coordinate) so that its border bottom edge is just below the existing scrollable overflow area. The projected border box would extend the scrollable overflow area by the current definition.

Scroll a small amount towards the end position. The projected box should now be well inside the existing scrollable overflow area. 

This shows that projection and scroll position should be taken into account when calculating the scrollable overflow area.

### Proposal:

Projection and scroll position should be taken into account when extending the scrollable overflow area accounting for transforms. 

The scrollable overflow area should be extended by the smallest area that would allow all projected border boxes to stay within the block-start/inline-start padding edges when the container is scrolled to the block/inline start position, and within the block-end/inline-end padding edges when the container is scrolled to the block/inline end positions.

Both Firefox and Chrome seem to account for the projection transform and the scroll position. Safari does not seem to take the projection into account at all.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8193 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 6 December 2022 22:27:57 UTC