8000 [css-anchor-position-1] position-visibility: anchors-visible should be clear about when is visibility determined · Issue #12732 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-anchor-position-1] position-visibility: anchors-visible should be clear about when is visibility determined #12732

@emilio

Description

@emilio

https://drafts.csswg.org/css-anchor-position-1/#valdef-position-visibility-anchors-visible says:

If the box has a default anchor box but that anchor box is invisible or clipped by intervening boxes, the box’s visibility property computes to force-hidden.

There are multiple problems with that definition:

  • Is the box's visibility property really intended to compute to force-hidden? There's no test for this, and I think it would make more sense to be a used-value time thing. In fact, at least that's how WebKit implements it (and Blink probably, too, given there's no test for force-hidden at all in all of WPT). Computes to would imply that you need to update the style in the whole subtree, because visibility is inherited, which seems rather unfortunate. It also has bigger ramifications (affects style container queries and so on...).

  • There's nothing that says when the visibility is checked. I'm assume, given the definition, the idea is that you check it every layout? If so I think that makes an even stronger case for it being used-value time tbh...

I guess the idea is that #10182 allowed you to trigger enter / exit transitions (not clear to me how... I guess transitioning position-visibility + container-queries or something)?

Maybe a more sensible approach is to use the same timing we use to evaluate fallbacks (ResizeObserver timing)?

cc @fantasai @tabatkins @dshin-moz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0