For the longest time this blog was using tailwind v1 in all it’s bloated glory. Compressed on the wire, this CSS took 304.74 kB and a whopping 2.93 MB on disk! For the longest time I’ve wanted to move to newer versions of tailwind that only output the classes that are used, but that would drastically increase the complexity of generating the site which otherwise only depends on python and hugo.
LLM’s to the rescue!
I prompted Gemini Pro (2026-01-18) to generate the equivalent CSS to the tailwind classes I was using. With a few back-and-forths I ended up with CSS that made the site identical to the original tailwind CSS at 0.4% of the on-the-wire size!
Any other options before LLMs would be rough:
From there I was able to update hugo to directly embed the minified CSS into every page to remove any CSS pop-in. My setup is just as simple as before, but now with much much less wasted bandwidth.
The whole process took less that 15 minutes, including figuring out how to get hugo to embed the stylesheet. This was a very long time coming, and I know it will personally help me when I’m on data looking at personal recipes.
While it was always possible to do without LLMs, I can honestly say that I wouldn’t have been able to find the time. When there’s a trade-off between engineering rigor and development effort, it’s definitely the case that better software is being created with LLMs.