TIL of using the "is" property
POSTED ON:
The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form.
The MDN
header p:hover,
main p:hover,
footer p:hover {
color: red;
cursor: pointer;
}
/* The above is equivalent to the following */
:is(header, main, footer) p:hover {
color: red;
cursor: pointer;
}
via r/steve8708's subreddit post
Related TILs
Tagged: css