DEV Community

Discussion on: Handling CSS3 Specificity

Collapse
 
alohci profile image
Nicholas Stimpson • Edited

Well, that's the very basics. The next steps are explain that the 1,10,100,1000 values are in an effectively infinite number base. Also you could include how to count the special case of the :not() pseudo-class. Braver is to explain why specificity, designed the way it is, is helpful, which requires an understanding of how selectors couple the styling of CSS properties to the semantics of the markup language.

Finally, technically what you have described is not css3 specificity, but css2 specificity. The Level 3 Selectors specification deliberately omits the style attribute value because it is an HTML feature, not a CSS one. The HTML style attribute can be regarded as simply something that trumps CSS specificity, rather than being part of it.

Collapse
 
ra9 profile image
Carlos Nah

Thanks for your review and your suggestions.
I will try to update this article.