|
12 | 12 | - [Upgrading your application from Tailwind v3 to v4](#upgrading-your-application-from-tailwind-v3-to-v4)
|
13 | 13 | * [You don't _have_ to upgrade](#you-dont-_have_-to-upgrade)
|
14 | 14 | * [Upgrade steps](#upgrade-steps)
|
| 15 | + * [Plugins](#plugins) |
15 | 16 | * [Troubleshooting](#troubleshooting)
|
16 | 17 | - [Developing with Tailwindcss](#developing-with-tailwindcss)
|
17 | 18 | * [Configuration and commands](#configuration-and-commands)
|
|
28 | 29 | * [Class names must be spelled out](#class-names-must-be-spelled-out)
|
29 | 30 | * [`ERROR: Cannot find the tailwindcss executable` for supported platform](#error-cannot-find-the-tailwindcss-executable-for-supported-platform)
|
30 | 31 | * [Using asset-pipeline assets](#using-asset-pipeline-assets)
|
31 |
| - * [Conflict with pre-existing asset pipeline stylesheets](#conflict-with-pre-existing-asset-pipeline-stylesheets) |
32 | 32 | - [License](#license)
|
33 | 33 |
|
34 | 34 | <!-- tocstop -->
|
@@ -67,6 +67,7 @@ A full explanation of a Tailwind v4 upgrade is out of scope for this README, so
|
67 | 67 |
|
68 | 68 | This gem will help with some of the mechanics of the upgrade, however.
|
69 | 69 |
|
| 70 | + |
70 | 71 | ### You don't _have_ to upgrade
|
71 | 72 |
|
72 | 73 | Keep in mind that you don't _need_ to upgrade. You can stay on Tailwind v3 for the foreseeable future if you prefer not to migrate now, or if your migration runs into problems.
|
@@ -107,7 +108,8 @@ Here's what the upgrade task does:
|
107 | 108 | - Removes references to the Inter font from the application layout.
|
108 | 109 | - Runs the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended).
|
109 | 110 |
|
110 |
| -Here's what that upgrade looks like on a vanilla Rails app: |
| 111 | +<details> |
| 112 | +<summary>Here's what that upgrade looks like on a vanilla Rails app.</summary> |
111 | 113 |
|
112 | 114 | ``` sh
|
113 | 115 | $ bin/rails tailwindcss:upgrade
|
@@ -145,9 +147,18 @@ Done in 56ms
|
145 | 147 | run bundle install --quiet
|
146 | 148 | ```
|
147 | 149 |
|
| 150 | +</details> |
| 151 | +
|
148 | 152 | If this doesn't succeed, it's likely that you've customized your Tailwind configuration and you'll need to do some work to make sure your application upgrades. Please read the [official upgrade guide](https://tailwindcss.com/docs/upgrade-guide)!
|
149 | 153 |
|
150 | 154 |
|
| 155 | +### Plugins |
| 156 | +
|
| 157 | +In Tailwind CLI v3, some Tailwind plugins were included by default in the CLI tool. However, in v4 these default plugins have been removed. |
| 158 | +
|
| 159 | +In order to use any plugins with v4, either by declaring them in your (optional) config file or using the [`@plugin` directive](https://tailwindcss.com/docs/functions-and-directives#plugin-directive), it's necessary to install them using a local javascript package manager. |
| 160 | +
|
| 161 | +
|
151 | 162 | ### Troubleshooting
|
152 | 163 |
|
153 | 164 | You may want to check out [TailwindCSS v4 - upgrade experience report · rails/tailwindcss-rails · Discussion #450](https://github.com/rails/tailwindcss-rails/discussions/450) if you're having trouble upgrading.
|
|
0 commit comments