DEV Community

Discussion on: What are your thoughts on Tailwind CSS?

 
koresar profile image
Vasyl Boroviak

Mate, in this thread I told them few times that none is using Tailwind without PurgeCSS.
But they simply ignore this fact.
No point in arguing here.

Thread Thread
 
ashleyjsheridan profile image
Ashley Sheridan

If that were truly the case, there wouldn't be websites out there using 1MB+ tailwind.css files. Given that there are, there is clearly an issue where PurgeCSS (or an equivalent) isn't a natural part of the ecosystem. Even if it seems a natural pairing, unless it's a first class citizen partnership, it means that Tailwind has the same problem of other CSS frameworks/libraries: there's a lot that just isn't needed.

Thread Thread
 
trixn86 profile image
trixn86

There has always been and will always be a problem with people not bothering to ship bad code. How does the number of websites that have shitty bundle sizes has anything to do with that? It's 10 min of work to setup the optimisation and the fact that those people didn't do it is not a problem of tailwind or purgecss but the fact that those people do not care.

You claim is basically: Not all people fasten their seatbelts therefore cars are bad unless the have a built-in first class automatic seatbelt fastener.

Thread Thread
 
ashleyjsheridan profile image
Ashley Sheridan

If it's not built-in and enforced by the library/framework, it will be ignored, and eventually becomes almost a defacto standard.

It's more similar to people not fastening their seatbelts because seatbelts aren't part of the car, and the driver needs to install them when they purchase the car. Because they're not built in, people won't use them unless something enforces their use.

Thread Thread
 
trixn86 profile image
trixn86

Again, there is a section in the docs describing the optimisation process which is literally a few-minute read and easy to follow and understand. The docs also describe, how to install tailwindcss and that includes autoprefixer and postcss. The reason that tailwind doesn't enforce installation of those is, that nowadays many people have custom build-chains and tools and there is no one-size-fits-it-all approach. Still, the recommendations are to install it and the docs only really describe how to install those together. Everybody that follows the "Installation" section will install it.

Your argument still boils down to "Some people don't care about bundle size and ignore the installation instructions therefore the framework itself sucks". Have you even read the docs? It clearly points out that you should install postcss together with tailwind and also how to do so. Not following that is a failure of the user, not of the framework.