Anchors aweigh! (2026.02.28 @ State of the Browser)

February 27, 2026 13:39

We've all been there. You need a popover to attach to a button, but they aren't parent/child. You end up reaching for JavaScript, calculating coordinates, and wrestling with viewport edges. CSS Anchor Positioning is a recent API designed to solve exactly this. This talk is a practical, down-to-earth look at how it works. We'll explore the anchor() function, the position-anchor and position-area properties, and @position-try to build UIs that are truly context-aware and robust, all without the JS hacks.

Views:
1
Download:

speaker

Bramus

bramus

more decks of the speaker