Monday, April 22, 2019

PurifyCSS Online - Remove unused CSS code from your stylesheets

This tool uses PurifyCSS, which is a JS library that scans your source code (HTML and JS) for used selectors and removes the unused code from your CSS files. 
PurifyCSS is meant to be installed via npm and built into your build process using tools like Grunt, Gulp or Webpack. 
However if you're using a different development stack or building your sites with a CMS like Wordpress, you can use this online tool to clean up your stylesheet. 
Especially if you are using CSS frameworks like Bootstrap or a multi-purpose Wordpress theme, chances are you are actually using less then 20% of the defined CSS rules.