:is(), :where(), :not()
:where() always has zero specificity, making it great for resets. :is() takes the specificity of its most specific argument.
:where() always has zero specificity, making it great for resets. :is() takes the specificity of its most specific argument.
/* :where() — zero specificity, easy to override */
:where(h1, h2, h3) { margin-top: 1.5rem; }
/* :is() — specificity of #main (1,0,0) */
:is(#main, article) p { font-size: 1.1rem; }
/* :not() — specificity of its argument */
a:not(.btn) { text-decoration: underline; }
Use :where() for base/reset styles so components can easily override them.