-
Notifications
You must be signed in to change notification settings - Fork 759
Description
In #12732 we resolved that position-visibility: anchors-visible used the same mechanics as IntersectionObserver, as if you used IntersectionObserver with the abspos cb as root.
That all seems fine, however when trying to implement it to the letter there are a few tests that highlight somewhat diverging behavior and need more clarification.
-
Even the basic test (https://wpt.fyi/results/css/css-anchor-position/position-visibility-anchors-visible.html) would not pass with the
.isIntersectingdefinition fromIntersectionObserverbecause that uses edge-inclusive intersection (https://w3c.github.io/IntersectionObserver/#update-intersection-observations-algo), so when you're right at the edge you'd claim the anchor is visible. This can probably be clarified in the anchor positioning spec by additionally requiring a non-zerointersectionArea. -
When both anchor and anchored are in the same containing-block (siblings) apparently
anchors-visibleis not intended to apply.position-visibility-anchors-visible-both-position-fixed.htmltests it. I'm not sure this is warranted, and I think this should probably change.