To complement and update the response, other plugins
Helion plugin
import the Helion plugin to your website
https://github.com/geuis/helium-css
<script type="text/javascript" src="helium.js" onload="helium.init()" async></script>
A textbox like this will appear
just click on START and it will scan all the CSS on your site.
With this you can analyze that :
- Green selectors are not being used
- Black selectors are being used
- Selectors in blue color, could not be tested due to them only
are activated with some user action, so test manually
afterward.
- Selectors in red color are poorly formed and damaging your CSS,
so make correction or delete them.
Chrome Plugin
install the
https://chrome.google.com/webstore/detail/unusedcss/dokggbghedajooenkgjbamikfgnngeik
Another Chrome plugin, untested but interesting is:
https://chrome.google.com/webstore/detail/css-remove-and-combine/cdfmaaeapjmacolkojefhfollmphonoh
It displays all the unused css and makes it possible to download a new CSS with only the items used, simply replacing yours. but as in Helion should beware of the : hovers of life