Search completed in 1.38 seconds.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
:matches() was renamed to :is() in CSSWG issue #3258. 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. Note that currently browsers support this functionality as :matches(), or through an older, prefixed pseudo-class --
:any(), including older versions of Chrome, Firefox, and Safari.
:any() works in exactly the same way as :matches()/:is(), except that it requires vendor prefixes and doesn't support complex selectors. /* Selects any paragraph inside a header, main or footer element that is being hovered */ :is(header, main, footer) p:hover { color: red; cursor: pointer; } /* The above is equivalent to the foll...
...For example, the following CSS: /* 3-deep (or more) unordered lists use a square */ ...