How to calculate specificity of CSS selectors