Better defaults for popovers
matuzo.at·5d
📦Flexbox
Preview
Report Post

posted on 16.01.2026

I recently added a rule to my reset style sheet UA+ that I wanted to share with you.

When you add a popover to a page and open it, it looks similar to a dialog in terms of its styling. It’s positioned at the center of the viewport.

Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser.

That’s okay, but I would argue that in most cases you want your popovers aligned closely with the button that controls them. As it turns out, that’s super easy to achieve in browsers that support CSS anchor positioning, since popovers already have an implicit anchor. All you need to do is ov…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help