The :not()
CSS pseudo-class represents elements that do not match a list of selectors. Since it prevents specific items from being selected, it is known as the negation pseudo-class.
/* Selects any element that is NOT a paragraph */ :not(p) { color: blue; }
The :not()
pseudo-class has a number of quirks, tricks, and unexpected results that you should be aware of before using it.