[csswg-drafts] [css-anchor-position] position-visibility initial value should be `always`, not `anchors-visible` ? (#10425)

chrisdavidmills has just created a new issue for https://github.com/w3c/csswg-drafts:

==  [css-anchor-position] position-visibility initial value should be `always`, not `anchors-visible` ? ==
When writing MDN docs for anchor positioning, I was a bit confused by [`position-visibility`](https://drafts.csswg.org/css-anchor-position-1/#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 behavior `always` 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](https://pr33467.content.dev.mdn.mozit.cloud/en-US/docs/Web/CSS/position-visibility#examples) illustrates the behavior of the currently-supported values, in case that is helpful.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10425 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 June 2024 14:12:22 UTC