To negate a selector in CSS, you can use the :not() pseudo-class. This allows you to select elements that do not match a specific criteria. It's mostly used with overwrites. This is widely supported, but you can check for more information here: https://caniuse.com/?search=CSS%20%3Anot()
Source code viewer
div:not(.exclude) { /* Your styles here */ }Programming Language: CSS