Unused CSS – clean up css stylesheets

Well,

Most of *tutorials* about speed optimization that I’v seen talk about minify css, combine them etc… today I’v faced myself (lol) in to a problem… I’m using Flat UI – Free Bootstrap Framework and Theme on a very simple html page. That page will be delivered in a zip file and I just want the HTML itself… So, I want to put the CSS in the HTML but I don’t want the unused stylesheets on it…

So I’v installed CSS remove and combine from Steve McArthur.

 

Some graphs taken from https://unused-css.com/ about the used/not used CSS selectors/stylesheed.

 

bootstrap.min.css

chart (4) chart (3)s

  • 27% of the CSS selectors are used
  • The cleaned CSS file size is 61% smaller

demo.css

chart (6) chart (5)

  • Css usage after cleaning 7% of the CSS selectors are used
  • The cleaned CSS file size is 85% smaller

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.