DEV Community

Discussion on: You will love Tailwind CSS

Collapse
 
rnrnshn profile image
Olimpio

I've tried it but I don't like to see a website full of atomic classes🤷🏼‍♂️... The HTML gets ugly with a lot of classes... Or I'm missing something?

Collapse
 
matfrana profile image
Matteo Frana

To keep HTML beautiful usually ugliness is hidden in the CSS :)

Really:
1) You get used to read Tailwind classes
2) With React, I hide this class names inside React components: every component is small and the final JSX ("HTML") is very clean

Collapse
 
wevisualizeit profile image
Jordan Hernandez • Edited

You can 'store' the classes in an object : example -->
const style = {
card:['max-w-sm rounded overflow-hidden shadow-lg content-center mx-auto'],
}
return(
div className={style.card}
)