DEV Community

loading...

Discussion on: Is the Tailwind approach a big step forward for CSS or just-yet-another-thing?

Collapse
jsn1nj4 profile image
JSn1nj4β€β€πŸ‘¨β€πŸ’»

Just a minor thing, but I believe Tailwind's @apply is a PostCSS directive, even if Sass provided that directive first.

Definitely agree something like Purgecss is needed. Love Tailwind, but I'd have a hard time shrinking my production CSS otherwise with the shear number of variants.

Collapse
mtpiercey profile image
Matthew Piercey

You're right, of course (since Tailwind needs PostCSS to function properly for most applications). I use Nuxt, so I'm used to over-abstraction to the point where "it just works", so I tend to forget where things actually come from.

Thread Thread
jsn1nj4 profile image
JSn1nj4β€β€πŸ‘¨β€πŸ’»

Nuxt is pretty awesome too (even though I haven't gotten to use it extensively yet). Love Vue!

Thread Thread
jsn1nj4 profile image
JSn1nj4β€β€πŸ‘¨β€πŸ’»

Also, no worries. Was mainly mentioning for others who would read. I'm really glad Tw has this directive too. I haven't yet, but I have some Vue components I'm thinking of taking the Tw classes from and turning into CSS componentsβ€”small things that make sense now that I've used Tw on this one project for a while. This directive will really come in handy in this case.

Collapse
rickmills profile image
Rick Mills

PurgeCSS is a must with tailwind. They actually added it as a built in feature in the latest release so it's super easy to get it up and running now.

I think this actually gives them a one-up on bootstrap now too as it does now mean that the out of the box compiled production css is far smaller than bootstraps.

Thread Thread
mtpiercey profile image
Matthew Piercey

Ah, I see! Thanks for the heads-up (I've been using 1.3, so I didn't catch that update). You got a point there; Tailwind + Purge (especially now that there's first-party support for the integration) is a winning combination.