Web features explorer
  • Home
  • Release notes
  • About
  • Features
  • Newly available
  • Widely available
  • Limited availability
  • Discouraged
  • Opposed
  • Most wanted
  • All features
  • Missing only in
  • Chromium
  • Firefox
  • Safari
  • Implemented only in
  • Chromium
  • Firefox
  • Safari
  • Features in latest releases
  • Chrome 158
  • Chrome Android 158
  • Edge 158
  • Firefox 161
  • Firefox for Android 161
  • Safari 27.2
  • Safari on iOS 27.2

:modal

Widely Available (since 2025-03-02)

The :modal pseudo-class selects elements that put other elements into a non-interactive state, such as a fullscreen element or a <dialog> element used with showModal().

Browser support

  • Chrome 105 Released on 2022-09-02
  • Chrome Android 105 Released on 2022-09-02
  • Edge 105 Released on 2022-09-01
  • Firefox 103 Released on 2022-07-26
  • Firefox for Android 103 Released on 2022-07-26
  • Safari 15.6 Released on 2022-07-20
  • Safari on iOS 15.6 Released on 2022-07-20

MDN documentation

  • :modal CSS pseudo-class

Specifications

  • Selectors Level 4 (#modal-state), from Cascading Style Sheets (CSS) Working Group (W3C).

Usage (according to Chrome Platform Status)

~3.819% of page loads. More data at chromestatus.com.

Web Platform Tests (WPT)

View the latest WPT test results for this feature

View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist

✕

Wait! Don't Go Yet 🚀

Get our FREE eBook "10 Programming Tips That Changed Everything" when you subscribe!

No spam. Unsubscribe anytime.