DEV Community

Discussion on: Love At Second Sight With TailwindCSS

Collapse
 
cscarlson profile image
cScarlson • Edited

YAFL

(Yet Another Framework Lock-In).

Why would I use TailwindCSS instead of using SASS/SCSS or LESS Mixins/classes from Bootstrap, Pure, Foundation, or some other library??? Also, never ever litter your markup with the literal classnames of the framework. You should always name the component what it actually is and then use the approach described in the last sentence to decorate your own style definitions. Not btn btn-blue. How about product option and then mixin/decorate your .product.option definition with the .btn and .btn-primary mixins where theming of .btn-primary is registered in your variables.ext file(s)? Why is the world going so mad? Oh, because of no resistance to YAFL, that's right.

Collapse
 
leesmith profile image
Lee Smith 🍻

Tailwind is definitely not what you're calling YAFL. I would suggest you educate yourself and read the motivation behind Adam's reasons for creating Tailwind before you spread your FUD. He covers your exact argument here. You're showing your ignorance when you lump Tailwind with Bootstrap, Foundation, etc.

Collapse
 
synapse709 profile image
Tim Titus

While I agree with you 100%, if you are making BaseComponents correctly in a framework like Vue, all of this dirty markup would be locked behind a component, meaning it's easier to access when needed, but actually doesn't dirty up your page templates.

I was totally in the boat of disregarding this (even when I'm a hardcore listener of the creator's podcast), looking at it further though, I realize the benefits. Perhaps I'll give it a try.