Scan for unused CSS

Hey everyone.

I am working on an app that uses a NodeJS backend (including serving Yii itself) that also runs WebPack in a watcher mode all the time. WebPack creates my assets and basically is an assets build tool. The hash for the files to be used is published to Redis, in turn, end up in Yii. So this system works flawless at this time and I always serve the most up-to-date files.

Now, through WebPack, I managed to press down my JS from 544 kb to 178 kb. But once I get to strip parts of jQuery, this is ment to become 100 kb /at most/. But what about my CSS?

Well, damn. The only "good" method is UnCSS(1). But UnCSS requires static files… now, we all know just how static Yii is, right? XD So my question is: Does anyone know of a good way to shrink the CSS by removing unused classes, when using a Yii app, that uses Bootstrap, Font-Awesome and few customs under the hood?

The way my CSS comes along:

Bootstrap via SCSS:

Rest is mainly in this file: . Each require call. that points to a CSS file, puts the contents into an external CSS file - which is later ran through clean-css for minification.

So yeah… halp? ^^

Check this - might help.