5 ms·
Tailwind's just a shorthand style for writing [a particular snapshotted older version of] CSS based on the theory that saving on keystrokes is worth more than u
by dogcomplex 4y ago
Tailwind's just a shorthand style for writing [a particular snapshotted older version of] CSS based on the theory that saving on keystrokes is worth more than understandable naming. It then leverages this brevity to let people over-define styles directly in the HTML, which would otherwise take paragraphs of normal CSS and therefore be unwieldy to do (so you'd just alias it into a new CSS property in a separate file). That's about it.
While brevity is a nice feature, and we should always strive to make the dev experience as elegant and simple as possible, methinks Tailwind is just asking to become yet another dead-end standard which I very much hope has a standardized compiler back to vanilla CSS. (Does it not?)
- danielvaughn 4y agoTailwind is neither a DSL nor is it any kind of standard. It's literally just utility classes. The "compiler" is really just tree-shaking. I feel like I'm taking crazy pills.
- jaredcwhite 4y agoTailwind stopped being "just utility classes" a long time ago and it's really become its own language with TW-specific terminology. https://tailwindcss.com/docs/adding-custom-styles https://tailwindcss.com/docs/adding-custom-styles https://tailwindcss.com/docs/hover-focus-and-other-states https://tailwindcss.com/docs/hover-focus-and-other-states
- dogcomplex 4y agoI hope you're right, and it's always easy to automatically replace Tailwind with vanilla CSS, but I'm not so sure anymore
- bastawhiz 4y ago> Tailwind's just a shorthand style for writing [a particular snapshotted older version of] CSS based on the theory that saving on keystrokes is worth more than understandable naming. Tailwind takes the "cascading" and "sheets" out of CSS. Instead of describing what types of things look like, it forces you to describe how each individual instance of everything looks. Which is a valid thing to do, but it's absolutely not a parallel track to the purpose and paradigm of vanilla CSS.
- dogcomplex 4y agoYeah but you can do that with CSS, you'd just never want to as it's too verbose and a pain to change en-masse compared to abstracted classes. Those concerns don't go away with Tailwind - they're just less trouble to type.
- andrei_says_ 4y agoTailwind takes a radical approach to the cascade by allowing devs to completely ignore it at the cost of losing the power of using it. It eliminates the need to name things at the cost of dealing with unreadable and unmaintainable class soup. It provides a useful set of constants trivial to create in any non-tailwind css codebase.