CSS :where() pseudo-class
- Vorige pagina :visited
- Volgende pagina :active
- Ga een niveau omhoog CSS Pseudo-class Referentie Handboek
Definition and usage
CSS :where()
Pseudo-classes are used to apply the same style to all elements within the parentheses.
:where()
Pseudo-classes require a comma-separated list of selectors as their parameters.
:where()
Pseudo-classes are similar to :is()
pseudo-classes are similar but differ in specificity::where()
has a specificity of 0, while :is()
The specificity depends on the most specific selector in its parameters.
Example
Apply red text color to p.intro, <ul>, and <ol> elements:
:where(p.intro, ul, ol) { color: red; }
CSS syntax
:where(selector-list) { css declarations; }
Technical details
Version: | CSS4 |
---|
Browser support
The numbers in the table specify the first browser version to fully support the pseudo-class.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
88 | 88 | 78 | 14 | 74 |
- Vorige pagina :visited
- Volgende pagina :active
- Ga een niveau omhoog CSS Pseudo-class Referentie Handboek