DEV Community

loading...

Discussion on: What's your experience with TailwindCSS?

Collapse
_garybell profile image
Gary Bell

One of my team members evaluated it to see if it was suitable for one of our projects. We came to the conclusion that it's incredibly heavy, and wouldn't give us the performance we desire from the front-end without some additional work, and without PurgeCSS.

Our thoughts were that it might be great for prototyping and getting things demo-ready, but would need to be removed ahead of any go-live or there would be performance issues.

Collapse
justaashir profile image
Aashir Aamir Khan

It can be the lightest CSS file you've ever put to production because of the tailwind.
Purgecss is built-in now, and pretty easy to use. You'll end up having 10kb minified even if you go heavy.

Collapse
_garybell profile image
Gary Bell

Thanks. I think I was just misunderstanding what was needed to get it to a sensible size

Collapse
marcellothearcane profile image
marcellothearcane

It comes with purgeCSS built in, and once it's set up you don't have to worry about it.

Collapse
_garybell profile image
Gary Bell

Thanks. I think I was just misunderstanding what was needed to get it to a sensible size

Collapse
thefern profile image
Fernando B 🚀

tailwindcss.com/docs/optimizing-fo...

When building for production, you should always use Tailwind's purge option to tree-shake unused styles and optimize your final build size. When removing unused styles with Tailwind, it's very hard to end up with more than 10kb of compressed CSS.

Collapse
_garybell profile image
Gary Bell

That's really handy.

I think we misunderstood what was needed, and then tried to work out how we'd apply it to our application structure. Ultimately we found a different one which would see us through the short-medium term which let us put in only the components we needed.

I'll have to give Tailwind a proper look over on a project at some point. It has the huge bonus of not being Bootstrap.