DEV Community

Discussion on: Is TailwindCSS Worth It?

Collapse
 
blindfish3 profile image
Ben Calder

So Tailwind just does everything I can already do with CSS (obviously) but I have to add an extra dependency and build step; learn its way of defining established CSS rules; and add more technical debt to my project?

Your article is well written, but it does nothing to convince me that Tailwind is worth the effort. Surely, given all the hype, there must be more to it than that? For example, I know there's some configuration available: does that bring something that I can't easily achieve with CSS? E.g. could it facilitate theming?

Collapse
 
dinanjanan profile image
Dinanjanan Ravindran

I haven't used the library yet, but it does look like it's worth it. It comes with support for responsive design and dark mode (which i guess answers your doubts), and being able to extract tailwind classes to custom CSS classes using @apply and it having IDE autocomplete support as well just makes it a more attractive option for me.
Seems like using it with a front-end library like React or Vue would be an intuitive experience, and doing so would also mean you can implement theming for your application.

Collapse
 
itstudiosi profile image
David Gil de Gómez

Well, you get tree-shaken CSS with minimal redundancy... I have to see those results when the CSS is written manually.

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

you can build a coverage test with puppeteer in less than 10min which will ensure you don't have unused or repeated code inside not only your CSS but your JS too so I would say good practices and tests are a must while Tailwind is not

 
itstudiosi profile image
David Gil de Gómez

You are complaining about an extra step and you want to set puppeteer up. Come on!

It is not about repeated code though, it is about redundant code.

 
joelbonetr profile image
JoelBonetR 🥇

You'll need to add tests anyway so it's a win-win.
I'll try - as I said - Tailwind by July (i'm busy enough till that) and maybe the situation turns out that tailwind ends up like CSS Houdini did so I can avoid to learn a dead thing or maybe not and it's really good and a breaking change, will see, the thing i dislike more about what I've been reading about is this "custom CSS properties" tbh

 
itstudiosi profile image
David Gil de Gómez

You don't test CSS, you test the visual results of the CSS.

Custom CSS directives is basically any modern CSS preprocessor, like SASS or LESS. Not sure what is your point anymore.

Collapse
 
blindfish3 profile image
Ben Calder

OK - so there are tangible benefits beyond duplicating standard CSS functionality? That's what I want to read about! Preferably with some comparisons with the CSS and pre-processor equivalents; so I can weigh up the cost/benefit of including Tailwind.

I've seen too many "Tailwind is amazing" articles (this one included) that just present the basic functionality as if this is enough justification to make the switch (IMO it isn't!); so my comment was a genuine invitation to provide some more concrete justification for all the hype 😅

So thanks for the comment: that at least tells me I should look into the docs in more detail to see what else it brings to the table.

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

well I feel like tailwind is late. With Sass you can code styles on a much more reasonable way (better by means ease to maintenance and refactors/reworks) so I can't find a reason to use a different tool than mainly CSS / Sass