4 ms·
https://purgecss.com/ https://purgecss.com/ does this, kind of -- it used to be recommended by Tailwind back when Tailwind shipped a giant zip-bomb stylesheet o
by csande17 2y ago
https://purgecss.com/ https://purgecss.com/ does this, kind of -- it used to be recommended by Tailwind back when Tailwind shipped a giant zip-bomb stylesheet of every possible property/value combination by default. I don't think it does the more complicated browser-like analysis you mention, though; it might just check whether class names appear in your HTML using a regex search.
The AMP WordPress plugin also does something like this IIRC (to try and fit stylesheets into AMP's size limit) but the tooling for it might be written in PHP.
- alberth 2y agoHow do you remove the unused CSS? https://purifycss.online/ https://purifycss.online/ Above is a nice online version of Purify. But it just seems to minimize the CSS, and doesn’t delete the unused CSS.