CSS :where() Pseudo-class
Example
Apply a red text color for p.intro, <ul> and <ol> elements:
:where(p.intro, ul, ol) {
color: red;
}
Try it Yourself »
Definition and Usage
The CSS :where()
pseudo-class
is used to apply the same style to all the elements inside the
parentheses, at the same time.
The :where()
pseudo-class requires a
comma-separated selector list as its argument.
The :where()
pseudo-class is equal to the
:is()
pseudo-class, except in specificity: :where()
always has 0
specificity, and :is()
takes on the specificity of the most specific
selector in its argument.
Version: | CSS4 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:where() | 88 | 88 | 78 | 14 | 74 |
CSS Syntax
:where(selector-list) {
css declarations;
}