CSS :where() Pseudo-class
- Pagina precedente :visited
- Pagina successiva :active
- Torna al livello superiore Manuale di Pseudoclasse CSS
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()
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 that fully supports this pseudo-class.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
88 | 88 | 78 | 14 | 74 |
- Pagina precedente :visited
- Pagina successiva :active
- Torna al livello superiore Manuale di Pseudoclasse CSS