The year is 2023, and CSS is continually improving. It is now possible to target not selected selectors like elements, classes, ids etc on a webpage using the CSS :not() pseudo-class In this article, we are going to talk about how the CSS :not() pseu...

Markdown supported Β· ββ΅ to post
Gemma Black
I didn't know about chaining:not, but that does look more readable. Thanks for the tip:
:not(.foo, .bar){ border: 2px solid red; }And the use case for first and last elements is actually one I would definitely have a use for π