top | item 35354482

(no title)

krvajal | 2 years ago

Tailwind v20 = just css

discuss

order

megaman821|2 years ago

The spec authors should be looking at the popularity of Tailwind and be thinking of how to enhance the style attribute. Then Tailwind really could mostly be a bunch of CSS variables and inline styles.

err4nt|2 years ago

Tailwind depends on @apply in PostCSS to function, something that was never officially proposed for CSS, but has been killed by its author and we know for sure CSS won't do, for the reasons the author of the original @apply idea lists here: https://www.xanthir.com/b4o00

So we have known all along that this will never happen. It was rejected for some very good reasons before Tailwind began.

return_to_monke|2 years ago

an argument for it is that it couples content and styling together, instead of them being in different layers.

Sometimes, they are, and should be, separate. But in other cases, styling is related to the content, or part of it.

megous|2 years ago

The only time I can imagine coupling content and styling together is if you have mostly non-repetitive elements in the content (rare, I think, maybe some very "designed" landing page, or whatnot), or you have other ways to repeat the elements without writing the styles out each time for each element. (And at that point you've just moved the problem of having to invent names for CSS classes to having to invent names for bunch of "components" and their properties)

The5thElephant|2 years ago

This is achievable in a much nicer way with SFC frameworks like Vue and Svelte where you also get scoped styles and other benefits. One of the reasons Tailwind is so popular is that so few developers know anything other than React.