CSS Reference ยท Pseudo-classes
The :paused pseudo-class
Reference for the CSS :paused pseudo-class: match audio and video elements that are paused. Limited browser support, with a JavaScript fallback.
The :paused pseudo-class matches an <audio> or <video> element whose playback is paused. It is the counterpart of :playing and belongs to the same group of media state pseudo-classes.
Support is limited. A browser that does not know :paused drops the whole rule, so keep a fallback for anything important.
video:paused { filter: grayscale(1); }
Try it
The script keeps the example working everywhere. Where :paused is supported, the CSS rule matches too.
Syntax
:paused { /* declarations */ }
No arguments; specificity (0,1,0).
Syntax and arguments
| Part | Description |
|---|---|
:paused |
Matches media that is not playing: not started, paused by the user, or ended (depending on the browser). |
:not(:paused) |
Matches media that is playing, and non-media elements. |
Usage notes
- Initial state counts. A video that has not started yet is usually paused, so it matches before the first play.
- Use
@supports selector(:paused)to guard rules, or detect withCSS.supports("selector(:paused)"). - Events are the dependable route. Use the
play,pauseandendedevents to toggle a class until support is universal. - Styling controls. Native controls cannot be styled with this; use it for the surrounding wrapper or the media element itself.
- Don't communicate state by colour alone. If paused state is important, also change an icon or text label for accessibility.
Browser support
Limited: available in only some browsers and not Baseline. Check a current support table and use a fallback.
Related
:playingโ playing media:picture-in-pictureโ floating video:fullscreenโ fullscreen element- Lessons: Filters, Feature queries