Good idea and I like the article. Unfortunately it looks like it only works with HTML files that are listed. Would be nice if it could read a sitemap.xml.
Just stumbled upon an article regarding removing unused CSS so I wanted to check what was in store for Roots/Sage since I am relying on that framework almost exclusively.
Regarding your post:
How is your experience with Sage and UnCSS? Any major differences (besideds gulp now instead of grunt)?
Haven’t tried the process yet so it might well just work but wanted to get a short hint beforehand.
Bare in mind when using UNCSS that you need to comment out the removal of classes for JS use like .collapse or any other that are added via JS as uncss didn’t pick those up last time i was using it. So you need to test it quite a bit after.
For a side note i stopped commenting out bootstrap because of problems with mixins etc. so you are removing only some parts in the end. But since you can get 250ms loading speed (pingdom) with a clean trellis+bedrock+sage install (using CDN and gzip) on it wasn’t that big of a deal anymore.