Skip to content

doc: Add to v3-v4 upgrade guide about custom css files #486

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

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

frayzil
Copy link
Contributor

@frayzil frayzil commented Feb 2, 2025

If an application has custom css files that use tailwind classes like this:

/* app/assets/stylesheets/pagy.css */
@layer components {
  .pagy.info {
    @apply text-gray-600 ml-0 mt-1 text-sm;
  }
}

referenced like this:

/* app/assets/stylesheets/application.tailwind.css */

/* ... */
@import "pagy.css";
/* ... */

Then, the reference has to be changed to:

/* app/assets/stylesheets/application.tailwind.css */

/* ... */
@import "../stylesheets/pagy.css";
/* ... */

for the upstream upgrade tool to run successfully
because the base tailwind css file will be changed
from app/assets/stylesheets/application.tailwind.css
to app/assets/tailwind/application.css

Copy link
Member

@flavorjones flavorjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for suggesting this!

@flavorjones
Copy link
Member

Thank you again!! ❤️

@flavorjones flavorjones merged commit 0ff4b97 into rails:main Feb 3, 2025
17 checks passed
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