Skip to content

Commit 985ecbc

Browse files
committed
Replace the v3-related postcss docs with a pointer to the v3 branch
1 parent 476301d commit 985ecbc

File tree

1 file changed

+8
-33
lines changed

1 file changed

+8
-33
lines changed

README.md

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* [Upgrade steps](#upgrade-steps)
1515
* [Troubleshooting a v4 upgrade](#troubleshooting-a-v4-upgrade)
1616
* [Updating CSS class names for v4](#updating-css-class-names-for-v4)
17-
- [Developing with Tailwindcss](#developing-with-tailwindcss)
17+
- [Developing with TailwindCSS](#developing-with-tailwindcss)
1818
* [Configuration and commands](#configuration-and-commands)
1919
* [Building for production](#building-for-production)
2020
* [Building for testing](#building-for-testing)
@@ -44,7 +44,7 @@ With Rails 7 you can generate a new application preconfigured with Tailwind CSS
4444
1. Run `./bin/bundle add tailwindcss-rails`
4545
2. Run `./bin/rails tailwindcss:install`
4646

47-
This gem depends on the `tailwindcss-ruby` gem to install a working Tailwind CLI executable.
47+
This gem depends on the `tailwindcss-ruby` gem to install a working TailwindCSS CLI executable.
4848

4949
### Choosing a specific version of `tailwindcss`
5050

@@ -239,7 +239,7 @@ Then, once you've run that successfully, clean up:
239239
```
240240
- **Revert** the changes to `config/tailwind.config.js` so that paths are once again relative to the application root.
241241
242-
## Developing with Tailwindcss
242+
## Developing with TailwindCSS
243243
244244
### Configuration and commands
245245
@@ -355,38 +355,13 @@ Than use `@plugin` annotation in `app/assets/tailwind/application.css`:
355355
356356
### Using with PostCSS
357357
> [!NOTE]
358-
> Starting with Tailwind 4, the TailwindCSS CLI tool no longer supports PostCSS out of the box, as the `--postcss` command has been removed. The below information only partains to Tailwind 3.
359-
> If you're wanting to leverage PostCSS with Tailwind 4, you'll likely want to reference [The official Tailwind 4 PostCSS docs](https://tailwindcss.com/docs/installation/using-postcss), and leverage [cssbundling-rails](https://github.com/rails/cssbundling-rails).
358+
> Starting with Tailwind v4, the CLI tool no longer supports PostCSS, and the `--postcss` option has
359+
been removed. The below information only pertains to Tailwind 3.
360360
361-
If you want to use PostCSS as a preprocessor, create a custom `postcss.config.js` in your project root directory, and that file will be loaded by Tailwind automatically.
361+
If you want to leverage PostCSS with Tailwind 4, please reference [The official Tailwind 4 PostCSS docs](https://tailwindcss.com/docs/installation/using-postcss), and leverage [cssbundling-rails](https://github.com/rails/cssbundling-rails).
362362
363-
For example, to enable nesting:
364-
365-
```js
366-
// postcss.config.js
367-
export default {
368-
plugins: {
369-
"@tailwindcss/postcss": {},
370-
},
371-
};
372-
```
373-
374-
⚠ Note that PostCSS is a JavaScript tool with its own prerequisites! By default `tailwindcss-rails` does not require any JavaScript tooling, so in order to use PostCSS, a `package.json` with dependencies for your plugins and a package manager like `yarn` or `npm` is required, for example:
375-
376-
```json
377-
// package.json
378-
{
379-
"name": "my app",
380-
"private": true,
381-
"dependencies": {
382-
"@tailwindcss/postcss": "^4.0.0",
383-
"tailwindcss": "^4.0.0",
384-
"postcss": "^8.5.1"
385-
}
386-
}
387-
```
388-
389-
Then you can use yarn or npm to install the dependencies.
363+
If you want to leverage PostCSS with Tailwind 3, please reference the [tailwindcss-rails v3
364+
README](https://github.com/rails/tailwindcss-rails/tree/v3-stable?tab=readme-ov-file#using-with-postcss).
390365
391366
### Custom inputs or outputs
392367

0 commit comments

Comments
 (0)