[csswg-drafts] [css-anchor-position] [css-position] Unclear whether `position: relative` inset should impact anchor positioning (#10522)

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

== [css-anchor-position] [css-position] Unclear whether `position: relative` inset should impact anchor positioning ==
Reading the [spec](https://drafts.csswg.org/css-position/#relative-position), I see the following for `position: relative`:
> The box is laid out as for [static](https://drafts.csswg.org/css-position/#valdef-position-static), then offset from the resulting position. This offsetting is a purely visual effect, and does not affect the size or position of any other box, except insofar as it increases the [scrollable overflow area](https://drafts.csswg.org/css-overflow-3/#scrollable-overflow-region) of its ancestors. This [positioning scheme](https://drafts.csswg.org/css-position/#positioning-scheme) is called relative positioning.

My initial assumption is that this would also apply for anchor positioning, i.e. anchored elements would not move simply because we adjust the insets of a relatively positioned anchor. [But Chrome seems to adjust for the relative positioning in the following markup.](https://codepen.io/David-Choi-the-reactor/pen/ZENgdyW)

Also this is more of a nitpick, but the following is not true for descendants of the relatively positioned box:
> This offsetting is a purely visual effect, and does not affect the size or position of any other box

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


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

Received on Wednesday, 3 July 2024 16:46:56 UTC