3 ms·
I would much prefer the explicit, vertically-legible, autocompletable and real CSS rules to a horizontal mishmash of proprietary aliases.
by dbbk 3y ago
I would much prefer the explicit, vertically-legible, autocompletable and real CSS rules to a horizontal mishmash of proprietary aliases.
- moritzwarhier 3y agoI'm not even disagreeing with that. I saw the tradeoffs of Tailwind too. And yes, I also agree with the core of your critique: Tailwind is a (yet another) DSL on top of CSS, which makes it smelly. But as I see it, the reason for using Tailwind is not that this DSL was easier, in fact it's the opposite, I constantly had to use IDE autocomplete and/or the docs in order to use it. Tailwind is a nasty DSL inside the class attribute, yes. And still, this DSL can be and often is a relieve from other custom CSS that grows exponentially and causes bugs due to selector complexity. Tailwind IMO solves the same problem that styled-components, CSS Modules and ShadowDOM try to solve.
- dbbk 3y agoI've been using Styled Components exclusively for years and have no issues with selector complexity.
- moritzwarhier 3y agoI am using Styled Components as well in my current job and like it a lot. Maybe my post didn't make this clear, but that's what I meant when I said it solves the same problem for me. No dead styles, no specificity wars, no naming worries. Edit: I see, I wrote "try to solve" in contrast to "solve". That was unintentional and thus not what I wanted to say.