News for hackers. Stuff that matters.
Re:Tailwind CSS v3.0 by moritzwarhier on Thursday December 09, 2021 @03:42PM (#29502652)
The differences are:

* media queries

* @apply

* low specificity (tailwind doesn't do !important)

EDIT: It "does" important, but only when instructed so, in 1.x it was a global switch, apparently since 2.x its available as a per-class modifier. Thanks dcre

* the theming abstraction

* brevity

Re:Tailwind CSS v3.0 by dcre on Thursday December 09, 2021 @03:46PM (#29502694)
Tailwind does have important, it was added with JIT.

https://tailwindcss.com/docs/just-in-time-mode#built-in-impo...

Re:Tailwind CSS v3.0 by aidos on Thursday December 09, 2021 @03:50PM (#29502758)
Oh, nice, I think that’s a new 3.0 thing, not a JIT thing.
Re:Tailwind CSS v3.0 by dcre on Thursday December 09, 2021 @04:01PM (#29502874)
Looks like TW 2.2 from June. It wasn't in the initial JIT release in 2.1.

https://github.com/tailwindlabs/tailwindcss/releases/tag/v2....

Re:Tailwind CSS v3.0 by aidos on Thursday December 09, 2021 @04:08PM (#29502953)
I’m…not sure how I missed that, because I did look for it. Thanks for the heads up!
Re:Tailwind CSS v3.0 by nightpool on Thursday December 09, 2021 @04:02PM (#29502893)
In this scenario, "@apply" is just "a css class", so i don't think it's appropriate to list that as a benefit tailwind has over inline styles. In both cases you'd be defining the styles somewhere else.

Media queries are a good call out, they're definitely a benefit tailwind's approach has to the built-in browser support for inline styles. Another benefit is hover and focus states, which are very difficult to apply with inline styles.