Media element pseudo-classes
- Category
- Multimedia
- Type
- Chromium catches up
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: https://wpt.fyi/results/?q=feature%3Amedia-pseudos The remaining failure in sound-state.html depends on a change to how the muted content attribute should work in HTML: https://crbug.com/509570175 https://crrev.com/c/7831199
Summary
The :playing, :paused, :seeking, :buffering, :stalled, :muted, and :volume-locked CSS pseudo-classes match <audio> and <video> elements based on their state. This is one of the focus areas in https://wpt.fyi/interop-2026.
Motivation
Allows styling of media elements or custom media controls based on the state of the media element. For example, a large play button overlaying a video could be hidden while playing. There is no expectation that custom media controls can be implemented entirely with CSS, as there is still a lot of state not exposed to CSS.
Standards & signals
- Specification: https://html.spec.whatwg.org/multipage/semantics-other.html#pseudo-classes
- Firefox: Shipped/Shipping
- Safari: Shipped/Shipping
- Web developers: No signals
- Tracking bug: https://crbug.com/40246121
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=feature%3Amedia-pseudos
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Media%20element%20pseudo-classes
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Media%20element%20pseudo-classes
- Baseline status: https://webstatus.dev/?q=Media%20element%20pseudo-classes