Skip to content

Commit 716406f

Browse files
authored
doc: Concise docs for v3-v4 upgrade guide
1 parent 161febc commit 716406f

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you
104104
gem "tailwindcss-rails", "~> 4.0" # which transitively pins tailwindcss-ruby to v4
105105
```
106106

107+
**Update** references to any existing css files imported in `application.tailwind.css`
108+
```diff
109+
-@import "pagy.css";
110+
+@import "../stylesheets/pagy.css";
111+
```
112+
107113
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.
108114

109115
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
221227
222228
(Just add an additional `.` to all the paths referenced)
223229
224-
**Update** references to any existing css files imported in the `app/assets/stylesheets/application.tailwind.css`
225-
```diff
226-
@import "tailwindcss/components";
227-
@import "tailwindcss/utilities";
228-
229-
-@import "pagy.css";
230-
-@import "new_case.css";
231-
+@import "../stylesheets/pagy.css";
232-
+@import "../stylesheets/new_case.css";
233-
```
234-
235230
**Run** the upstream upgrader as instructed above.
236231
237232
Then, once you've run that successfully, clean up:
@@ -243,7 +238,6 @@ Then, once you've run that successfully, clean up:
243238
```
244239
- **Revert** the changes to `config/tailwind.config.js` so that paths are once again relative to the application root.
245240
246-
247241
## Developing with Tailwindcss
248242
249243
### Configuration and commands

0 commit comments

Comments
 (0)