3 ms·
I totally read the title as "Remnification" and "Remnyfication". I didn't see the right spelling until I got to section 5! "OH! RE-minification"... ;) Very nic
by dahart 10y ago
I totally read the title as "Remnification" and "Remnyfication". I didn't see the right spelling until I got to section 5! "OH! RE-minification"... ;)
Very nice, this is a fun project and a nice write up. I would definitely worry about lossy minification on production code, I've bumped into many minifier bugs that broke my valid CSS.
Also, pretty sure you could get Bootstrap.css down to a couple k-bytes and really truly pwn the file size leaderboard if you could dead-strip all the rules not actually referenced in your HTML & JS.
- TazeTSchnitzel 10y agoMentioned elsewhere in these comments, uncss does that.
- Falkon1313 10y agoThis is a good point. On any sizable site, especially one that has evolved over time, you can't really remove CSS, it just gradually accretes more and more. But most of the rules aren't even used on most pages. Being able to first remove anything not used, then remove anything that gets overridden in the cascade, could reduce CSS down to a tiny fraction of its full size (never mind comments and spacing). But would that give better results than loading a big bloated and wasteful CSS file once and caching it for the entire site (or many sites in a case like CDN'd Bootstrap)? Either way is one form of bloat and waste or another.