Skip to content

[css-contain-2] Is proximity to the viewport a property of the element or the box #8990

@vmpstr

Description

@vmpstr

This question came up on the following PR: #8904

The change in the PR defines a proximity to the viewport and asserts that once determined, the value can change (from being close to being far away and back) but can never go back to being undetermined for the lifetime of the element.

The question is whether the proximity being determined should instead be a property of the box, which will go back to being undetermined if the element loses the box (e.g. display: none). The reasoning is that proximity to the viewport is inherently a property of a box rather than an element.

My opinion is that being a property of the element is sufficient since it accomplishes the intent of the property (first determination has to be "synchronous"). It also avoids all of the cases that the group dealt with for contain-intrinsic-size's last remembered size -- specific timings of when it is forgotten, block <-> inline <-> contents <-> none transitions, etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions