Codemonkey
Codemonkey

Reputation: 4807

How can I detect unused CSS on my website, across all pages?

In the past I used a Firefox extension called Dust Me Selectors, but it appears to have been abandoned and isn't compatible with Firefox Quantum.

I've been searching for a while and I've failed to come up with a current alternative, other than http://unused-css.com which is a paid-for service. I'd rather have a tool I could use myself.

This must be something that every developer wonders at some point, so hopefully someone reading this will be able to point me in the right direction!

Upvotes: 7

Views: 5797

Answers (2)

Chuck
Chuck

Reputation: 108

Sorry for the late answer, I've found your question when searching for the same thing. Anyway you might be interested by :

https://purifycss.online/.

It removes unused css and you can add multiple urls.

Good luck

PS: I'm editing my answer because I found another website doing the unused CSS removal, maybe it will help someone reading this.

Upvotes: 7

Aliakbar sultani
Aliakbar sultani

Reputation: 38

Honest Answer: Remove one by one and see if it breaks the style.

Smart Answer: Use your browser devtool to disable each css property and watch what will happen.

Upvotes: -2

Related Questions