News for hackers. Stuff that matters.
Re:The Evolution of Scalable CSS by dogcomplex on Saturday November 12, 2022 @04:39PM (#33577377)
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?)

Re:The Evolution of Scalable CSS by danielvaughn on Saturday November 12, 2022 @06:38PM (#33578367)
Tailwind 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.

Re:The Evolution of Scalable CSS by jaredcwhite on Saturday November 12, 2022 @07:17PM (#33578623)
Tailwind 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/hover-focus-and-other-states

Re:The Evolution of Scalable CSS by dogcomplex on Saturday November 12, 2022 @08:52PM (#33579149)
I hope you're right, and it's always easy to automatically replace Tailwind with vanilla CSS, but I'm not so sure anymore
Re:The Evolution of Scalable CSS by bastawhiz on Saturday November 12, 2022 @06:59PM (#33578506)
> 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.

Re:The Evolution of Scalable CSS by dogcomplex on Saturday November 12, 2022 @08:49PM (#33579137)
Yeah 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.
Re:The Evolution of Scalable CSS by andrei_says_ on Saturday November 12, 2022 @07:34PM (#33578736)
Tailwind 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.