CSS :is() Pseudo-class
Example
Apply a red text color for p.intro, <ul> and <ol> elements:
color: red;
}
Definition and Usage
The CSS :is() pseudo-class
is used to apply the same style to all the elements inside the
parentheses, at the same time.
The :is() pseudo-class requires a
comma-separated selector list as its argument.
Tip: The :is() pseudo-class
can be very useful when dealing with HTML sections and headings.
Look at the following:
color: green;
}
Is equal to:
color: green;
}
| Version: | CSS4 |
|---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
| Pseudo-class | |||||
|---|---|---|---|---|---|
| :is() | 88 | 88 | 78 | 14 | 74 |
CSS Syntax
css declarations;
}