How to remove unused CSS to reduce the size of your CSS file?

Home » Programming & Design » How to remove unused CSS to reduce the size of your CSS file?
Programming & Design No Comments

Other answer:

Konstantin:
There are several browser plugins for web developers that will seek out css that is not in use on your website, then will ask if you want to remove it. Firefox has a whole web developer component that is priceless. I could not work without it.
joe:
If you typed a letter on your computer, how would you remove information in the letter that you did not want? Well apply the same principle to your CSS file!
dday9:
Run your markup through an optimizer, it will not only strip unused CSS but it will also tidy up your code too.
Chris:
You can use a web dev IDE that detects unused CSS.
Wes:
you can either remove the code completely from the stylesheet (normally style.css) or comment out the code like this /* Code to ignore here */ its always good practice to take a copy of the file first to restore if you make a mistake…

LEAVE A COMMENT