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

fix: unnecessary stylesheet_link_tag for tailwind #473

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

flavorjones
Copy link
Member

In Rails 8, propshaft detects :app and loads all the css files under app/assets/stylesheets, so we may not need this explicit tag for tailwind.

On installation, omit the tailwind stylesheet link tag if :app is already being passed to stylesheet_link_tag in the layout.

On upgrade, remove the tailwind stylesheet link tag if :app is already being passed to stylesheet_link_tag in the layout.

See related discussion at #412

In Rails 8, propshaft detects `:app` and loads all the css files under
app/assets/stylesheets, so we may not need this explicit tag for tailwind.

On installation, omit the tailwind stylesheet link tag if `:app` is
already being passed to stylesheet_link_tag in the layout.

On upgrade, remove the tailwind stylesheet link tag if `:app` is
already being passed to stylesheet_link_tag in the layout.
@flavorjones flavorjones force-pushed the flavorjones-fix-stylesheet-link-tags branch from be02dd2 to 7ae7a06 Compare January 24, 2025 17:36
@flavorjones flavorjones merged commit 9d30e2a into main Jan 24, 2025
17 checks passed
@flavorjones flavorjones deleted the flavorjones-fix-stylesheet-link-tags branch January 24, 2025 17:44
@brunoprietog
Copy link

This doesn't seem to be the behavior we need, since, if you use Tailwind, the :app argument will include all *.css files inside app/assets. Here we are only interested in tailwind, which is the final build of all the CSS files you might have if you use @import.

With this, we'd be including default CSS files that have tailwind syntax that wouldn't be appropriate.

@brunoprietog
Copy link

Ignore me, just saw #474 👍

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

Successfully merging this pull request may close these issues.

2 participants