News for hackers. Stuff that matters.
Re:TailwindCSS v2.0 by adamzapasnik on Wednesday November 18, 2020 @03:04PM (#25141747)
I think there are two reasons:

- you can copy the classes from html directly into @apply (you need to tinker a bit more to get responsive/hover/etc classes to work, though)

- you work with predefined values, so if you switch color in tailwind.config.js, it's gonna get correct value in the @apply class too.

That's the way I see it

Re:TailwindCSS v2.0 by usaphp on Wednesday November 18, 2020 @05:13PM (#25143155)
2. which values are you going to ever change in align-center, display-flex and text-color-white, it's not like you will change the display flex to mean display block or align center to mean align start, it will always be the same. Same with color white and 95% of other classes that tailwind uses.
Re:TailwindCSS v2.0 by IggleSniggle on Wednesday November 18, 2020 @03:18PM (#25141902)
For the second one, couldn’t you get the same effect by just using css variables?
Re:TailwindCSS v2.0 by adamzapasnik on Wednesday November 18, 2020 @03:28PM (#25142037)
Sure you can and you should, right?

But this way you have to write couple of classes more, couple of variables more. And with Tailwind you just define/change value in the config and you have all the classes generated, so the changes are minimal.