Closed cbuteau closed 5 years ago
Hi @cbuteau, Stylelint can parse an entire CSS file and report on various aspects of the CSS, including the specificity of the selectors. It uses this library under the hood for specificity calculations. I would suggest you try that out.
You can even install it as an extension in your code editor, such as VS Code, and hover your cursor over the selectors to see their specificity.
Hello, I stumbled on this tool from this article.
https://codeburst.io/css-specificity-an-overview-3edb93e4d16e
I am trying to write a script for my team that they can calculate existing class specificity so they can understand better our existing classes.
How do I load such a CSS file into your system to perform those calculations?