giakki/uncss: Remove unused styles from CSS
▻https://github.com/giakki/uncss
UnCSS is a tool that removes unused CSS from your stylesheets. It works across multiple files and supports Javascript-injected CSS.
How?
– The process by which UnCSS removes the unused rules is as follows:
– The HTML files are loaded by PhantomJS and JavaScript is executed.
– All the stylesheets are parsed by PostCSS.
– document.querySelector filters out selectors that are not found in the HTML files.
– The remaining rules are converted back to CSS.