How to remove tailwind CSS from your Rails project

I've stopped using tailwind CSS for one of my personal projects. To test things out, I removed tailwind first like this:

<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>

Which worked fine locally and I was able to continue with the project just fine.

But deploying this to Heroku will fail with an error:

...

       
       Rebuilding...
       
       Done in 705ms.
       rake aborted!
       SassC::SyntaxError: Error: Function rgb is missing argument $green.
               on line 1 of stdin
       >> us-ring-color}a{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacit
          ------------------------------------------^

...

 !

 !     Precompiling assets failed.

 !

 !     Push rejected, failed to compile Ruby app.

 !     Push failed

To fix that you could go to the GitHub Issue and find a solution.

What I did instead since I didn't want to use it anymore anyway, is purging the half-dead tailwind from everywhere in my codebase:

All the files involved in removing tailwind from the CSS pipeline.
👋
This does not include the mess that Tailwind has done so far to your CSS 🤣 This will be an extra step to gradually remove all of it.