Anchor positioning might be one of the most exciting features coming to #CSS. It is currently available under an experimental flag in Chrome Canary, and after playing with it for a bit, I couldn’t stop myself from sharing what I found.

In my new article, I will show you some of my experiments — https://kizu.dev/anchor-positioning-experiments/

Future CSS: Anchor Positioning

Anchor positioning might be one of the most exciting features coming to CSS. It is currently available under an experimental flag in Chrome Canary, and after playing with it for a bit, I couldn’t stop myself from sharing what I found. In this article, I will show you some of my experiments.

Yay, one of the issues in #CSS anchor positioning that was bugging me a lot was just resolved: https://github.com/w3c/csswg-drafts/issues/8165

Now the acceptance criteria would allow targeting absolutely-positioned elements that go before our anchored element in the tree, which would be _very_ helpful for a lot of use-cases.

And, as an addition, now for anchors that share the same name, the _last_ one would be used instead of the first one. Which also would make more sense and cover more cases.

[css-anchor-1] Can't anchor one popover to another · Issue #8165 · w3c/csswg-drafts

Right now we can't anchor one popover to another, because: Popovers are in the document's top layer, which means they are absolutely positioned with either viewport or ICB as the containing block T...

GitHub
@kizu Plus future of CSS position rules:
https://www.w3.org/TR/css-position-3/#insets
CSS Positioned Layout Module Level 3