Skip to content

Commit a30ad61

Browse files
committed
doc: update README section on postcss
1 parent 5caa7eb commit a30ad61

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

Diff for: README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,6 @@ This also works with relative paths. If you've installed into your app's directo
3838
TAILWINDCSS_INSTALL_DIR=node_modules/.bin
3939
```
4040

41-
### Using a custom postcss.config.js
42-
43-
If you want to use a custom `postcss.config.js`, for example to enable nesting, you can place it in the `config` folder and it will be loaded automatically.
44-
45-
```
46-
module.exports = {
47-
plugins: {
48-
'postcss-import': {},
49-
'tailwindcss/nesting': {},
50-
tailwindcss: {},
51-
autoprefixer: {},
52-
},
53-
}
54-
```
55-
5641
## Developing with Tailwindcss
5742

5843
### Configuration
@@ -114,6 +99,24 @@ If you want unminified assets, you can pass a `debug` argument to the rake task,
11499
Note that you can combine task options, e.g. `rails tailwindcss:watch[debug,poll]`.
115100

116101

102+
### Using with PostCSS
103+
104+
If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and it will be loaded automatically.
105+
106+
For example, to enable nesting:
107+
108+
```js
109+
// config/postcss.config.js
110+
module.exports = {
111+
plugins: {
112+
'postcss-import': {},
113+
'tailwindcss/nesting': {},
114+
tailwindcss: {},
115+
autoprefixer: {},
116+
},
117+
}
118+
```
119+
117120
### Custom inputs or outputs
118121

119122
If you need to use a custom input or output file, you can run `bundle exec tailwindcss` to access the platform-specific executable, and give it your own build options.

0 commit comments

Comments
 (0)