From 161febcd7975b999747d785db40785d60797fb76 Mon Sep 17 00:00:00 2001 From: Syed Fazil Basheer <27231393+frayzil@users.noreply.github.com> Date: Sun, 2 Feb 2025 11:14:14 +0530 Subject: [PATCH 1/2] doc: Add to v3-v4 upgrade guide about custom css files --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c8e67e3b..afaa2fff 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,17 @@ With some additional manual work the upstream upgrade tool will update your appl (Just add an additional `.` to all the paths referenced) +**Update** references to any existing css files imported in the `app/assets/stylesheets/application.tailwind.css` +```diff + @import "tailwindcss/components"; + @import "tailwindcss/utilities"; + +-@import "pagy.css"; +-@import "new_case.css"; ++@import "../stylesheets/pagy.css"; ++@import "../stylesheets/new_case.css"; +``` + **Run** the upstream upgrader as instructed above. Then, once you've run that successfully, clean up: From 716406fad1985314f4aa3bfa94077a7497eb0ee6 Mon Sep 17 00:00:00 2001 From: Syed Fazil Basheer <27231393+frayzil@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:27:20 +0530 Subject: [PATCH 2/2] doc: Concise docs for v3-v4 upgrade guide --- README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index afaa2fff..61b4e02a 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,12 @@ First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you gem "tailwindcss-rails", "~> 4.0" # which transitively pins tailwindcss-ruby to v4 ``` +**Update** references to any existing css files imported in `application.tailwind.css` +```diff +-@import "pagy.css"; ++@import "../stylesheets/pagy.css"; +``` + If you want to migrate CSS class names for v4 (this is an optional step!), jump to [Updating CSS class names for v4](#updating-css-class-names-for-v4) before continuing. Then, run `bin/rails tailwindcss:upgrade`. Among other things, this will try to run the official Tailwind upgrade utility. It requires `npx` in order to run, but it's a one-time operation and is *highly recommended* for a successful upgrade. @@ -221,17 +227,6 @@ With some additional manual work the upstream upgrade tool will update your appl (Just add an additional `.` to all the paths referenced) -**Update** references to any existing css files imported in the `app/assets/stylesheets/application.tailwind.css` -```diff - @import "tailwindcss/components"; - @import "tailwindcss/utilities"; - --@import "pagy.css"; --@import "new_case.css"; -+@import "../stylesheets/pagy.css"; -+@import "../stylesheets/new_case.css"; -``` - **Run** the upstream upgrader as instructed above. Then, once you've run that successfully, clean up: @@ -243,7 +238,6 @@ Then, once you've run that successfully, clean up: ``` - **Revert** the changes to `config/tailwind.config.js` so that paths are once again relative to the application root. - ## Developing with Tailwindcss ### Configuration and commands