DEV Community

Discussion on: Tailwind isn't the answer

Collapse
 
madeleineostoja profile image
Madi Ostoja

This is literally the point. You can get the core benefits of tailwind with just “a couple of CSS variables”. Using them, or your own, in any way you can use CSS, means you don’t have to reinvent CSS with the style-by-classes paradigm

Collapse
 
justindmyers profile image
Justin Myers

No, the point is that you don't even understand Tailwind.

It's not just "some variables".

Collapse
 
einlinuus profile image
EinLinuus

I guess you have never worked with TailwindCSS. It's so much more that just variables.

  • A few elements next to each other and you need a line between them? divide-x / divide-y
  • Need spacing between elements? space-x / space-y
  • You need a grid? grid grid-cols-1 md:grid-cols-2 and you have a responsive 2 column grid layout
  • Want to change the color of an element when you hover over the parent? Add group to the parent and group-hover:text-red-500 to the child - done

In my eyes, TailwindCSS is even easier than writing regular CSS. Example: Grid. 2 Columns in TailwindCSS: grid-cols-2 / Regular CSS: grid-template-columns: 1fr 1fr);

And "saving a few keystrokes" - it saves A LOT of time to just write your html and do styling directly inside the class attribute, thank thinking of a class name, navigating to the css file and do it manually there.