2 ms·
I don't like massive long class names on my DOM elements. And I don't think it makes the code look/read nice. Tailwind is so close to CSS that I'm often left sc
by beardedman 4y ago
I don't like massive long class names on my DOM elements. And I don't think it makes the code look/read nice. Tailwind is so close to CSS that I'm often left scratching my head as to why people don't just write CSS - it will look nicer too.
- aloisdg 4y agobecause the cascade part of CSS is error prone and because naming stuff is hard. Functional lib like tailwind or tachyons solve both those problem as far as I am concerned.
- beardedman 4y ago> because naming stuff is hard This feels like a weak argument. Yes, naming things are hard - but we name classes, variables, dom elements & everything else every day. There are also really good naming patterns for CSS out there too (BEM, etc.).
- 0xCAP 4y agoBecause, if we're talking about css-in-js, then they'd need an external dependency anyway to handle hover/etc.. states. TailwindCSS lets you inline that.
- beardedman 4y agoYou also don't need CSS-in-JS.
- methyl 4y agoSo you need either to keep styles inline, which has a lot of drawbacks, or figure out a name for every single thing. Tailwind is essentially inline styling done right + a set of constraints to keep your design consistent even if you are not a designer. Pretty sweet setup if you ask me.
- ape4 4y agoIt moved stuff from style="..." to class="..." - what a break thru