Skip to content

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

@johannesodland

Description

@johannesodland

css-overflow-3 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 or inline-start padding edges, accounting for transforms by projecting each box onto the plane of the element that establishes its 3D rendering context. [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.

Firefox seem to account for the perspective transform and the scroll position. Chrome seems to account for the perspective transform, but only at the 'start' scroll position. Safari does not seem to take the projection into account at all.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions