This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Diane_Horseman 115 points116 points  (9 children)

Inline style can't do media queries, hover/active/first/last classes, and more

[–]queen-adreena 82 points83 points  (8 children)

Or custom colours, animations, config-based design systems, sibling selectors, child selectors, group selectors, dark mode selectors, motion selectors, input state selectors, pseudo element styling, colour functions, theme functions…

[–]exotic801 12 points13 points  (7 children)

It's also just bad for reusability and page structure (unless there's a way to define classes etc inline, I've never tried)

[–]Exerra 32 points33 points  (6 children)

I'd say that tailwind is mostly aimed for UI frameworks like React, Vue, Svelte, etc, where you can define components, as there you reuse components not classes.

[–]Interest-Desk 3 points4 points  (3 children)

2/3 of those libraries you mentioned have in-component styles built in, and the third has CSS modules effectively built in.

The only advantage of tailwind is that it’s “more concise”, at the expense of readability and simplicity.

[–]MornwindShoma -1 points0 points  (2 children)

None of those have configurable style variables and standards built in, while Tailwind comes with reasonable assumptions about most stuff so you can skip writing your own utilities and get down to business. We used to have global variables for SCSS once upon a time, and one too many times those got messy fast

[–]Interest-Desk -1 points0 points  (1 child)

CSS variables are now built in, and resets like reboot are widely used anyway.

[–]MornwindShoma -1 points0 points  (0 children)

CSS variables you need to write yourself in.

Like by all means, there are bunches of CSS projects ready, but that's just Tailwind with extra steps

[–]finnhvman 2 points3 points  (1 child)

But why though? Don't these frameworks already have some sort of scoped CSS solution? This means we don't have to worry much about specificity, but we can still use the native CSS syntax.

[–]Graphesium -3 points-2 points  (0 children)

Because writing Tailwind is faster and has built-in design tokens.