🆕 Why Tailwind CSS

https://dev.to/swyx/why-tailwind-css-2o8f

Some thoughts on why I have recently adopted @tailwindcss, and why it is still worth using even if your framework has scoped styling like Vue or Svelte.
Responses to @mark_volkmann's concerns (49mins into https://twitter.com/SvelteSociety/status/1311700640939175936?s=20)

- Sharing CSS by "lifting it up" creates hard-to-delete CSS. Create components if truly repeated, if not, copy-and-paste.
- Classname bloat is a concern. But could write devtools to collapse.
For a fun, profanity-filled recap of the history of CSS and the hidden power struggle behind it, check out this old talk by @fat. We have been wrestling with the cascade since the dawn of the browser.
Thanks to a discussion in the comments about the complexity of the cascade, just added a classic Rich Hickey shoutout.

Who knew watching random Clojure talks would have relevance to my thinking on CSS?
ah, its been a while since i've been told i dont belong in web development
hey @Tailwindcss Twitter - care to share your favorite @apply usecases (keeping in mind @adamwathan's warning that you shouldn't overuse them, use components for entire repeated elements)?

i'm now getting into looking for utilities I use a lot: this is my first @apply:
@lukejacksonn has a fascinating Tailwind variant that doesn't involve purging and now also supports variant groups - one of the pain points raised in my blogpost!

only concern is IDE integration but this is promising https://twitter.com/lukejacksonn/status/1320334162641956873?s=20
You can follow @swyx.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: