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

The CSS Working Group just discussed `[css-contain-2] Is proximity to the viewport a property of the element or the box`, and agreed to the following:

* `RESOLVED: Proximity state is a proeprty of the element (shares its lifetime)`
* `RESOLVED: Proximity to the vieport is reset (returned to undefined) when the element is disconnected`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> khush: filling in for vlad...<br>
&lt;TabAtkins> khush: adding in spec text for c-i-s, there's a state about its proximity to the vieport<br>
&lt;TabAtkins> khush: starts undetermined, then later becomes far or close to the viewport, affecting whether it's relevant<br>
&lt;TabAtkins> khush: we know it can toggle between close and far, but can it ever toggle back to undefined?<br>
&lt;TabAtkins> khush: options are to say it has the same lifetime as the element, so once determined it stays that way<br>
&lt;TabAtkins> khush: other is to say it's a property of the box, which means if th ebox disappears it goes back to undetermined<br>
&lt;TabAtkins> khush: Reason is that in the frame that it becomes visible to the user, if it's initially undetermined it has a frame where it's still not drawn<br>
&lt;TabAtkins> khush: This also runs into the same issues as last remembered size, where you ahve to specify the timing of when it goes back to undetermined<br>
&lt;TabAtkins> khush: hopefully we can reuse that text<br>
&lt;TabAtkins> khush: I think the spec text for last remembered size hasn't fully landed? i was looking at impl to figure this out<br>
&lt;TabAtkins> khush: In blink it's when the RO runs, if element is detached, it forgets its last remembered size<br>
&lt;TabAtkins> khush: but here if you detach and reattach in the same frame you might want to forget its proximity<br>
&lt;TabAtkins> khush: with implementor hat on, might prefer it being a proeprty of the element, less work when it gets reattached<br>
&lt;emilio> q+<br>
&lt;TabAtkins> khush: and we can change that easier in the future if we want to make it care about box destruction, i think<br>
&lt;TabAtkins> emilio: use-case of detach/attach can also be fixed if it's a proeprty of the element<br>
&lt;TabAtkins> emilio: You can define that when it's removed from the doc its size is removed - i think taht's what we defined for last remembered size?<br>
&lt;TabAtkins> emilio: And that would fit the use-case I think?<br>
&lt;TabAtkins> khush: yeah, if element is detached from the dom you reset it, that could be the only case<br>
&lt;TabAtkins> astearns: i'm a little confused, you wanted it a property of the element os it's not reset...<br>
&lt;TabAtkins> khush: it's simpler than if it's a property of the box - there are more cases where the box is destroyed<br>
&lt;TabAtkins> khush: if it's a property of the element, and just *detaching* is the only way to reset, that's simpler to ipmlements<br>
&lt;TabAtkins> emilio: and "when the box is recreated" isn't really specified<br>
&lt;TabAtkins> yup, was gonna say that<br>
&lt;khush> +1 to emilio's thinking.<br>
&lt;emilio> ack emilio<br>
&lt;astearns> ack emilio<br>
&lt;astearns> ack dbaron<br>
&lt;TabAtkins> dbaron: I'm happy with this proposal to say it's on the element and reset upon removal<br>
&lt;TabAtkins> dbaron: it feels logically that it's associated with teh box, but we don't define box lifetime clearly so it's hard to make something interoperable that depends on taht<br>
&lt;TabAtkins> dbaron: so better off depending it as a proeprty of the element even if it makes a little less sense<br>
&lt;TabAtkins> +1<br>
&lt;TabAtkins> proposed resolution: the proximity state is a property of the element<br>
&lt;TabAtkins> RESOLVED: Proximity state is a proeprty of the element (shares its lifetime)<br>
&lt;TabAtkins> second proposed, state is reset upon detach<br>
&lt;TabAtkins> emilio: I think "disconnected" is the right technical term there<br>
&lt;TabAtkins> RESOLVED: Proximity to the vieport is reset (returned to undefined) when the element is disconnected<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8990#issuecomment-1632859678 using your GitHub account


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

Received on Wednesday, 12 July 2023 16:32:38 UTC