I just got to know about the CSS points which could help you understand the specificity of one's styling.
Styling a project sometimes becomes difficult not understanding why a particular element is not showing the style added to it, this might be due to the specificity rule.
These are the rules for calculating CSS points for specificity,
Element - 1 point,
Classes - 10 points,
Id - 100 points.
When you have a compound selector, just add up based on the selectors used to get the degree of specificity.
So in your next project, if you are experiencing difficulty styling an an element and it's not showing the style, please check up the specificity.
Happy coding...
Top comments (0)