DEV Community

Discussion on: Why I switched from normal CSS to Tailwind CSS

 
mike_hasarms profile image
Mike Healy

I don't know a lot about brotli, but I have to imagine every compression algorithm uses tokens to replace reused content, otherwise it wouldn't be effective at all.

The CSS purge is site or app wide, not per page. This is what you want, because the number of unique classes doesn't keep growing and growing as an app gets bigger. A single CSS file then covers the whole app, and is usually much smaller than traditional CSS that has to grow to style more components and patterns throughout an app.

I just checked a few sites using Tailwind in production (not mine), and the CSS build sizes were:

  • 59kb (11kb gzipped)
  • 14kb (4kb gzipped)
  • 67kb (12kb gzipped)
Thread Thread
 
sebbdk profile image
Sebastian Vargr

Nice, thank you for taking the time to get these numbers. :)