-
Notifications
You must be signed in to change notification settings - Fork 765
Open
Labels
css-contain-2Current WorkCurrent Work
Description
In [1], point 5 defines the behavior of scrollIntoView targeting on an element with content-visibility:auto.
For the purposes of scrolling operations, such as scrollIntoView(), an element with content-visibility: auto that is skipping its contents has its size and location determined with size containment still active.
However, it does not mention the behavior of scrollIntoView targeting on a descendant with content-visibility:auto. Tested in Chromium and WebKit, the content-visibility:auto is treated as visible before scrolling, it makes sense to me. The related test cases are content-visibility-075.html and content-visibility-076.html.
Should we make it clear in the specification? Maybe something like this?
- Before scrolling, if the element with c-v: auto has descendant as the target of scrolling, change the relevancy to visible, so that the element could be laid out as if it were relevancy to user. Here we could add a test with nested c-v auto, see test
content-visibility-vs-scrollIntoView-001.html
in the FireFox patch. - Performance scrolling.
- After scrolling, we need to check the relevancy again in the intersection observer, if the element with c-v auto is not visible, we should hide its content again. This could happen if there is
overflow: clip. See test case
content-visibility-vs-scrollIntoView-002.html
in the FireFox patch.
vmpstr, rwlbuis and fabiospampinato
Metadata
Metadata
Assignees
Labels
css-contain-2Current WorkCurrent Work