DEV Community

Discussion on: Normal to struggle with Tailwind?

 
leob profile image
leob

Thanks a lot for this extensive answer, I wasn't familiar with Atomic CSS (but I was with Tailwind, and it's more or less the same concept) ...

I see what you mean, same as Tailwind this is to be used in the context of a framework like React or Vue that allows you to create components, hence solving the problems of "repetition" and "consistency" ... you wouldn't want to create a large site with heaps of HTML where you duplicate class=background-color:#023 a hundred times across your codebase.

Thread Thread
 
machy8 profile image
Vladimír Macháček

You can define components, variables and custom macros (like my-2) in Stylify if you need to. Therefore you don't have to have such repetative code.
More => dev.to/machy8/comment/1p2jj

Thread Thread
 
leob profile image
leob

Thanks for explaining that, so with these variables you avoid sprinkling hardcoded RGB values or hardcoded font/padding/margin sizes all over your codebase ... I do understand the advantages of this approach, traditional CSS stylesheets also have their problems.