by larrymyers · 3y ago · 0 comments
1. Find source file with class name. See the scss extension, dread rises a bit.
2. See scss file has multiple @import directives and uses multiple custom functions.
3. Open up 4 more scss files to see what those imports and functions do. See that those files also use @import directives. Find some Malort, take a shot.
4. Repeat step 3 until arriving at root of style hierarchy or pass out.
That's why Tailwind works. It may result in a very long line of small classnames to represent all the styles across many breakpoints, but at least you don't have to deal with somebody else's own little hellish adventure into perfectly reusable scss.Tailwind is seeing steadily increasingly popularity (and the accompanying backlash) because it is straight forward and does not require something like stylelint to keep you from hurting yourself.
Ultimately, it really is "a couple hours of thinking/configuring a linter vs. multiple layers of abstraction, complexity and dependencies added to the codebase."
Maybe I'm missing something (and be my guest if I do!) but there is an objectively better choice here.
I really dislike sass the way it's normally used. It was once a necessary hack, but it's mostly not useful anymore. Something that just concatenates your CSS @include on deployment would bring more value nowadays.
And now that I think about it, that would be a great exercise in fact! Yes, I'd really appreciate it if you have some in mind and would post them here.
I'm all ears (eyes)!