The joy of handwriting CSS
Today I came across PurgeCSS: a tool that allows you to rid your website of unused stylesheet rules. It seems to be very useful if you’re knee-deep in external CSS dependencies, brought in by the various frameworks and plugins used in websites these days. But preferably you don’t need a tool like this at all. This need is typical of the way modern web development is often conducted. You’re slapdash gluing a bunch of tools and libraries together. Mix it with your CSS framework of choice, say Bootstrap or Tailwind and after a bit of development you end up with a big ball of stylesheets, often 100kB or more. And that is when you reach for CSS processors like Less, minifiers and, yeah, PurgeCSS.
Lees meer