I upgraded a Rails app using Postcss to Tailwind v4 last week and it took several hours, so I thought I'd share my notes…
https://hybrd.co/posts/upgrading-a-rails-app-to-tailwind-v4
https://hybrd.co/posts/upgrading-a-rails-app-to-tailwind-v4
Comments
I love native css, but nothing lets you go as fast as Tailwind when you want to prototype or rapidly evolve a project.
So, I added Tailwind on top. We’re about to upgrade to v4, but we have Sass files, which the Vite plugin doesn’t support.
Maybe I could get away with the PostCSS plugin, but was hoping to get rid of PostCSS.
I also don’t think we need Sass now that CSS has properties and nesting, but not sure how to easily convert it.
Yeah, I haven't had to convert a lot of custom Sass, just small amounts. Usually I'm just completely replacing it for Tailwind. Straddling the two sounds really challenging!
We did need to sandwich Bootstrap styles between Tailwind preflight and utilties for desired specificity. Occasionally I still need to “!” a Tailwind utility, but mostly it works fine.