I have inherited a massive style sheet with many thousands of selectors, and I’m sure that many of them are not needed and never correspond to elements on the site. In the interest of optimization, I would like to remove these orphan selectors / rules.
Are there any tools that would allow me to compare CSS with the whole site to determine which selectors are needed and which are not?
The site has AJAX components, so writing a curl / wget script to move around the site and then looping through each selector and grep to match is not particularly feasible (although that would be interesting ...)
All suggestions are welcome.
Thanks JD
optimization css css-selectors orphan
Jonathan day
source share