There is a good amount of information on this site about specificity. The seminal one is Specifics on CSS Specificity, which has been updated a few times over the years. When it was originally published in 2008, it presented the information in a bit of a misleading way. It has long since been fixed, but the mistake is still interesting.
The original article showed specificity as an integer, so a selector like #main article.news p:first-child
would have been listed as 0122
for the 1 ID, 2 classes, and 2 elements. The mistake? That makes it seem like a base-10 system. Say the specificity value was 0129 – if it was a base-10 system, adding one more element selector would make that 0130 which is definitely not what happens.
Jonathan Snook originally corrected me:
… if you had an element with 11 classes applied to it, it would not outrank an element with a single ID selector.
And Eric Meyer corroborated:
Specificity is not base-10. It