DEV Community

Discussion on: My secret trick for writing great React components

Collapse
 
bertmeeuws profile image
Bert Meeuws

I am in love with tailwind, the way you can just copy paste html and pass it on to a partner and it should look the same (taking position etc. into consideration).

And never having to scroll trough massive css files is worth the hassle of big HTML.

Thread Thread
 
randomusername profile image
Heroe • Edited

Well it may be fine but tailwind didn't invent anything nor there is anything innovative into this approcah, that's just old css utility classes, a bit like bootstrap ( although you'd most likely still use custom css with it since it;s opinionated ) and almost verbatim what tachyons basscss etc have been doing for years.

Thread Thread
 
muhsarip profile image
muhsarip

too many class inside single element, make use of tailwind is harder to read.

Thread Thread
 
victorocna profile image
Victor Ocnarescu

You are perfectly right, Tailwind did not invent anything new and Tachyons did this years ago. In my personal experience I prefer Tailwind over Tachyons because class names have better names for the first one.

Take f5-l which for Tachyons means font-size: 1rem.
Tailwind has font-base which means the same thing.

Thread Thread
 
victorocna profile image
Victor Ocnarescu • Edited

I also love the fact that I do not have to come up with names for classes. In the old days I would say container or container-header, now I just add utility classes like flex flex-col gap-2 and everyone in my team understands the CSS behind it.