I have read on css tricks that :not should not add additional specificity. But it looks like it does?
https://css-tricks.com/almanac/selectors/n/not/
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.
Or am I missing something?
.red:not(.blue) {
background: blue;
}
.red {
height: 100px;
width: 100px;
background: red;
}
<div class="red">
</div>
.blue.red
instead, the.red
still counts – Festination