[css-anchor-position] position-visibility initial value should be always
, not anchors-visible
? · Issue #10425 · w3c/csswg-drafts (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
When writing MDN docs for anchor positioning, I was a bit confused by position-visibility — the spec says "initial value" is anchors-visible
, but surely it should be always
?
From testing:
- If you don't set a
position-visibility
value, an anchor-positioned element is always visible provided it is inside the viewport, regardless of the visibility of its anchor. This is the behavioralways
gives as well. anchors-visible
, on the other hand, causes an anchor-positioned element to be hidden if its anchor is not visible at all in the viewport.
My demo illustrates the behavior of the currently-supported values, in case that is helpful.