CSS :popover-open Pseudo-Class

Beginner
2 examples
Updated: Nov 2026

Definition and Usage

The :popover-open pseudo-class matches a popover element while it is showing. Use it with the HTML popover attribute to style open menus and tooltips.

CSS Syntax

syntax.css
[popover]:popover-open {
  border: 1px solid #cbd5e1;
}

Key Uses

PatternPurposeTry it
:popover-openPopover is currently shownTry it
with transitionsAnimate open popovers with @starting-styleTry it

CSS Examples

Open popover panel

example.css
.menu:popover-open {
  padding: .75rem;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}
Try It Yourself

Browser Support

:popover-open is a CSS selector.

✓ Selectors

:popover-open

Supported in modern browsers.

94% Modern browsers
Google Chrome Recent
Full support
Mozilla Firefox Recent
Full support
Apple Safari Recent
Full support
Microsoft Edge Recent
Full support
:popover-open Modern support

Bottom line: Safe for modern sites. Keep readable defaults without the selector.

Frequently Asked Questions

An element with the HTML popover attribute that the browser can show and hide as top-layer UI.
Yes for basic toggles using popovertarget buttons.
No. Popovers are usually non-modal top-layer UI; dialogs use :modal.
Yes, often with transitions and @starting-style.
Supported in current Chromium, Safari, and Firefox.

Next: ::backdrop

Continue with ::backdrop.

::backdrop →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

2 people found this page helpful