Modern Selectors: :is(), :where(), :has(), :not() and State Pseudo-classes
:is() takes its specificity from its most specific argument, while :where() is always zero; :not() and :has() are calculated like :is(). On Bookstore's catalog and checkout pages we measure specificity through the DevTools protocol, style a book card without a cover with :has() and an invalid form row with :user-invalid without JavaScript, and show the real behavior of :focus-visible, :open, :nth-child(of S) and :empty in Chromium and WebKit.
14 Nov 2026
·
13 min
·
2