0

I would like to find out on what pages of a website some style elements of a style.css are used? For example, I would like to find out if .view-product {margin: 0} is used on x, y, or z pages of a website.

So far I have used Chrome Developer (Audits) to identify which css rules are not used on particular page, and used diffchecker to check the difference between the full css file, and the Chrome developer audits generated content.

Chrome Developer (Audits) Generated Result

Any other methods?

Thanks.

tleo
  • 351
  • 3
  • 16
  • possible duplicate https://stackoverflow.com/questions/135657/how-to-identify-unused-css-definitions – DaFois Jun 06 '17 at 19:23
  • Just curious, is this your own website or somebody else's that you're trying to look more deeply at? – TCharb Jun 06 '17 at 19:23
  • [Chrome 60 has a new coverage tool](https://developers.google.com/web/updates/2017/05/devtools-release-notes) which may help with this sort of thing. – Scott Jun 06 '17 at 19:24
  • This requires Firefox, but collects all CSS not used while browsing the pages. That way, you don't have to do one page at the time. http://www.pontikis.net/blog/remove-unused-css – Gerard Jun 06 '17 at 19:28
  • Possible duplicate of [How to identify unused css definitions](https://stackoverflow.com/questions/135657/how-to-identify-unused-css-definitions) – Matthew Strawbridge Jun 06 '17 at 19:36

0 Answers0