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

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

== [css-contain-2] Is proximity to the viewport a property of the element or the box ==
This question came up on the following PR: https://github.com/w3c/csswg-drafts/pull/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](https://drafts.csswg.org/css-sizing-4/#last-remembered) -- specific timings of when it is forgotten, block <-> inline <-> contents <-> none transitions, etc

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


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

Received on Tuesday, 20 June 2023 03:27:37 UTC