Re: [csswg-drafts] [css-contain] Should scrollIntoView scroll to content-visibility: hidden subtree elements (#6529)

> The question is do these hidden elements have a layout box?

Yes, the content below a `content-visibility: hidden` element have boxes. This is very important to support the cached-rendering and measurement use cases.

I agree that we should make `scrollIntoView` do nothing for hidden elements, similar to how fragment navigations do nothing. The spec could say, in step 6, "If the element does not have any associated layout box, *or is not available to user-agent features*, then return.". The "not available..." copies the spec text that is [already here](https://drafts.csswg.org/css-contain-2/#valdef-content-visibility-hidden).

-- 
GitHub Notification of comment by chrishtr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6529#issuecomment-905650475 using your GitHub account


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

Received on Wednesday, 25 August 2021 15:58:05 UTC