Note - Posted on

I just read the latest issue of Chris’ Corner on CodePen. I then read the following articles, all of which Chris links to:

Oh boy! My mind is completely fried. I had no idea anchor positioning was this complicated. I would be afraid to touch CSS anchor positioning if not for this recommendation from James to make it work reliably.

  1. Make the anchor and the positioned element siblings.
  2. Put the anchor first in the DOM.

I also saw the Winging It episode on ‘Debugging CSS Anchor Positioning‘. It really helped me develop a mental model of how anchor positioning works and why the gotchas exist.

Also, I totally agree with Tab Atkins-Bittner that dev tools really need a way to show the containing block for elements, especially absPos/fixedPos elements.

Posted on

← Back to the previous page