But how do we calculate the specificity of that whole selector? Just add up all the pieces? No. The Working Group recently decided that the specificity contributed from inside a
:not() will be equal to the single selector with the highest specificity. So given
div:not(.one, .two, #navbar) p, the
#navbar will contribute
0,1,0,0 to the overall specificity of the selector, yielding a total of
0,1,0,2. The specificities of
.two are ignored.