How to remove tailwind CSS from your Rails project

In: Ruby on Rails

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:

remove tailwind for good.png
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.
Comments
More from RichStone Input Output
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to RichStone Input Output.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.