-
Notifications
You must be signed in to change notification settings - Fork 746
Description
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 toforce-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 forforce-hidden
at all in all of WPT). Computes to would imply that you need to update the style in the whole subtree, becausevisibility
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)?