The negation pseudo-class, :not(X), is a functional notation taking a simple selector X as an argument. It matches an element that is not represented by the argument. X must not contain another negation selector, or any pseudo-elements.
The specificity of the :not pseudo-class is the specificity of its argument. The :not pseudo-class does not add to the selector specificity, unlike other pseudo-classes.


<!DOCTYPE html>
p: not (.classy ) {
	color: red;

: not ( p ) {
	color: green;
	<p>Some text.</p>
	<p class="classy">Some other text.</p>
	<span>One more text<span>

You may also like...