Legend
Legend

Reputation: 116790

Removing unused selectors in a CSS stylesheet?

I've been developing a web app for a few weeks now and ended up with about a 1000 lines. I am sure not all the selectors are being used and am trying to clean it up. At the same time, I don't want to do it manually for obvious reasons.

Is there a safe and an efficient way to remove unused selectors? For this, am I supposed to navigate the entire website to let it know which selectors are not being used? (I use javascript to add some selectors so these might not show up until a particular usecase is seen)

Upvotes: 6

Views: 896

Answers (1)

Dave Markle
Dave Markle

Reputation: 97671

Not sure why Dust-Me-Selectors is in there as a comment, but not an answer...

Upvotes: 9

Related Questions