DEV Community

Discussion on: Tailwind isn't the answer

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.