I have a bunch of CSS files with a bunch of classes. I know a lot are not used.
Is there a tool that will scan your site and clean up your CSS files or tell me which ones aren't used?
If you want to remove unused CSS entirely, you can use a tool such as PurifyCSS to find out how much CSS file size can be reduced. Once you get the CSS code you should eliminate, you have to remove it manually from the page. If you want to deep dive into a manual solution, you can read the CSS-tricks in-depth article.
You can't delete CSS files through Javascript on the browser because that's a client-side scripting language.
The clear CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The clear property applies to floating and non-floating elements.
Have a look at excellent firefox addon:
Dust-Me Selectors
(source: mozilla.org)
This site has some nice tricks about what you need to do http://www.makeuseof.com/tag/useful-tools-to-check-clean-and-optimize-your-css-file/.
It suggests some tools like a Firefox plugin called Dust-Me selectors.. http://www.sitepoint.com/dustmeselectors/
(source: netdna-cdn.com)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With