Skip to content

[css-contain] content-visibility: auto visibility check timing needs details #8542

@emilio

Description

@emilio

https://drafts.csswg.org/css-contain/#cv-notes has:

The initial determination of visibility for content-visibility: auto must happen in the same frame that determined an existence of a new content-visibility: auto element.

When and how, exactly? This is not really implementable without more details. Since the visibility check is usually done with an intersection observer, but intersection observer callbacks happen async per spec (https://w3c.github.io/IntersectionObserver/#queue-intersection-observer-entry-algo), how is this supposed to happen in the same frame?

Does that mean that computing the intersections of the frame can change layout, and thus can change whether other stuff intersects? I hope not...

cc @chrishtr @asurkov @mrobinson @Loirooriol

Metadata

Metadata

Assignees

No one assigned

    Labels

    HTMLRequires coordination with HTML peoplecss-contain-2Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions