Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class detection in Ruby Template files #13778

Open
grekko-headacy opened this issue Jun 3, 2024 · 0 comments
Open

Class detection in Ruby Template files #13778

grekko-headacy opened this issue Jun 3, 2024 · 0 comments

Comments

@grekko-headacy
Copy link

grekko-headacy commented Jun 3, 2024

What version of Tailwind CSS are you using?

v3.3.3

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

Using vite with v4.4.12

What version of Node.js are you using?

v21.5.0

Reproduction URL

n/a – I can add a repo later for debugging help.

Describe your issue

We are using ViewComponent to manage our HTML templates.

With a ruby template like this:

class FooComponent < ApplicationComponent
  def call = tag.span "Foo", class: %w[rounded-full h-0.75 w-0.75]
end

The generated Tailwind styles include rounded-full, h-0.75 but not the w-0.75-class.

When re-arranging the css classes like so:

class FooComponent < ApplicationComponent
  def call = tag.span "Foo", class: %w[rounded-full w-0.75 h-0.75]
end

The generated Tailwind styles include include rounded-full, w-0.75 but not the h-0.75-class.

When re-arranging the css classes like so:

class FooComponent < ApplicationComponent
  def call = tag.span "Foo", class: %w[w-0.75 h-0.75 rounded-full]
end
``

The generated Tailwind styles includes all expected classes (`rounded-full`, `h-0.75` but and `w-0.75`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant