8000 [css-contain-4] c-v: auto elements painted into snapshots for View Transitions · Issue #8060 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-contain-4] c-v: auto elements painted into snapshots for View Transitions #8060

@khushalsagar

Description

@khushalsagar

This was a part of #7874 but wasn't resolved at the last meeting where this issue was discussed. The edit also needs to go into the contain spec so filing another issue.

If an element is participating in a transition, any element in its sub-tree (which has c-v: auto) should become relevant to the user. This makes sense given that the named element will be painted into a snapshot. This snapshot's position and scale is animated during the transition (by the pseudo-element its drawn in). So all its content (including the c-v: auto elements) could be in the viewport.

Given that the snapshot for all non-root elements paints the entire DOM tree underneath, it'll make all c-v: auto elements underneath a non-root named element relevant to the user. It's only the root (for which the snapshot is clipped) which can have c-v: auto elements underneath that are clipped out of the snapshot and hence don't need to be made relevant to the user.

Proposed Resolution: An element with content-visibility: auto is relevant to the user if it is painted into self or an ancestor's snapshot during a view transition.

@vmpstr @frivoal fyi.

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

      0