Skip to content

Style output via tailwindcss-rails gem appears off when compared to other build options #15426

@phillipspc

Description

@phillipspc

What version of Tailwind CSS are you using?

v3.4.16

What build tool (or framework if it abstracts the build tool) are you using?

the tailwindcss-rails gem

What version of Node.js are you using?

N/A

What browser are you using?

Issue seems browser agnostic, but I've tested Safari and Firefox

What operating system are you using?

macOS

Reproduction URL

Repo with minimal amount of changes to reproduce the issue here: https://github.com/phillipspc/railstailwind

Describe your issue

It looks like something is off in how styles are compiled via the tailwindcss-rails gem. When comparing the same HTML with the same utility classes against a Rails project building with Vite (minimal repo here), that styling looks correct there, but wrong in the gem version.

Here's a screenshot of a copy/pasted TailwindUI component:
image

I opened this issue originally on the gem's GitHub page, however according to the maintainer:

There's no magic in this gem, it's just running the upstream tailwindcss CLI against the generated tailwind config.

So it seems like whatever is breaking things in the gem is happening "upstream". This issue was first reported on December 5th.
I'm wondering if anyone from the Tailwind team would have a better idea, given that timing, of what might have changed that would introduce a downstream issue with the tailwindcss-rails gem.

Any help is much appreciated, and if I can assist in providing any better reproduction/troubleshooting steps, I'm happy to do so!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions