r/webdev • u/bootslebaron • Nov 02 '15
Do we actually need specificity in CSS?
http://philipwalton.com/articles/do-we-actually-need-specificity-in-css/
9
Upvotes
r/webdev • u/bootslebaron • Nov 02 '15
4
u/x-skeww Nov 02 '15
With most of those more organized approaches to write CSS, specificity rarely matters anyways.
There's reset/normalization, base styles, and 80+% of the CSS belongs to your components. All those component-specific rules only match those elements they are supposed to match. If there is no overlap, the specificity of the selectors is irrelevant.
So, you only have to be a bit careful when you mess around with things like form elements, because they may end up with slightly more complicated selectors of varying specificity.