> Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :matches(). https://www.w3.org/TR/2018/WD-selectors-4-20180201/#matches Safari support `:matches(::before)` The `:matches()` has now been renamed to `:is()` > https://drafts.csswg.org/selectors/#selectordef-matches