[csswg-drafts] [css-contain][css-anchor-position-1] Should size/layout containment also contain anchor names? (#9349)

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

== [css-contain][css-anchor-position-1] Should size/layout containment also contain anchor names? ==
In #9100 we resolved that style containment should contain anchor names. 

The containment spec, non-normatively says the following about the size containment:

> When paired with [layout containment](https://drafts.csswg.org/css-contain-2/#layout-containment), though, possible optimizations that can be enabled include (but are not limited to):
> * When the style or contents of a descendant of the [containment box](https://drafts.csswg.org/css-contain-2/#size-containment-box) is changed, calculating what part of the DOM tree is "dirtied" and might need to be re-laid out can stop at the containment box.
> * When laying out the page, if the [containment box](https://drafts.csswg.org/css-contain-2/#size-containment-box) is off-screen or obscured, the layout of its contents (i.e. "[laying out in-place](https://drafts.csswg.org/css-contain-2/#laying-out-in-place)") can be delayed or done at a lower priority.

I don't believe these optimizations would hold if anchor names are not contained by size or layout containment.

I was thinking about this in context of content-visibility, which would need to contain anchor names in some way, but it also sets style containment so #9100 should be enough to satisfy that concern.


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


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

Received on Wednesday, 13 September 2023 07:46:31 UTC