DEV Community

loading...

Discussion on: Is TailwindCSS Worth It?

Collapse
wkrueger profile image
Willian Krueger • Edited

Your sample probably misses the point of tailwind. One could just have written raw CSS here, without all the compilation fuss. Thats what I first tought about tailwind. "This is just glorified inline css"!

I think the main idea is that:

  • tailwinds primitives are a bit more constrained than raw CSS. For instance you agree to a grid (15px ex) or to a color scheme;

  • Modifiers are cool. And you can create your own (ex: sm:xxx)

  • the major value lives in the power of the settings

  • the main downside is that you need a somewhat complex build process, even a custom editor plugin, just for adding glorified inline CSS?

Collapse
itstudiosi profile image
David Gil de Gómez

I don't understand all this criticism with "very complicated build process" when it is really easy to set up.

Collapse
blindfish3 profile image
Ben Calder

Of course adding a dependency to your project is just a trivial npm install --save-dev away (and hopefully minimal config); but what you're also adding is technical debt. So the question is: does Tailwind provide enough functionality (compared to well established solutions) to justify this? Is the config - to use it effectively - minimal in practice? How easy will it be to replace when the next new and shiny CSS solution comes along? Will new developers (who should already know CSS) be able to pick it up quickly? How maintainable is the code going to be? etc. etc.

There's far more to properly managing a project than installing the latest shiny toy because everyone's raving about it...

Thread Thread
itstudiosi profile image
David Gil de Gómez

How it adds technical debt?

What adds technical debt is to have a trillion lines of redundant CSS. Adding a library does not add technical debt.

Thread Thread
blindfish3 profile image
Ben Calder

Depends on your definition I suppose... but IMO adding a library absolutely does add to technical debt; especially if not well managed. TBH I can't be bothered getting into a long discussion on that subject right now; so I guess we can agree to disagree on that.
Anyway - the point is that some developers are more cautious than others; so we want to see tangible, quantifiable benefits before investing ourselves into a new library. As far as Tailwind is concerned I'm yet to be convinced 🤷

Collapse
wkrueger profile image
Willian Krueger • Edited
  • Adds an extra syntax over CSS (@apply etc)
  • Requires specific CSS pipeline (postcss)
  • Requires CSS tree-shaking

Not a problem on a new project. But definitely not the most transparent build.

Do the other CSS frameworks require a build step? Imagine if every JS framework required an additional babel plugin. Adding extra webpack plugin IS complicated, compared to adding an HTML tag.

Forem Open with the Forem app