summaryrefslogtreecommitdiff
path: root/node_modules/tailwindcss/src/postcss-plugins/nesting/README.md
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:54:57 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:57:48 +0100
commitb1e2c8fd5cb5dfa46bc440a12eafaf56cd844b1c (patch)
tree49d360fd6cbc6a2754efe93524ac47ff0fbe0f7d /node_modules/tailwindcss/src/postcss-plugins/nesting/README.md
Docs
Diffstat (limited to 'node_modules/tailwindcss/src/postcss-plugins/nesting/README.md')
-rw-r--r--node_modules/tailwindcss/src/postcss-plugins/nesting/README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/node_modules/tailwindcss/src/postcss-plugins/nesting/README.md b/node_modules/tailwindcss/src/postcss-plugins/nesting/README.md
new file mode 100644
index 0000000..49cdbb5
--- /dev/null
+++ b/node_modules/tailwindcss/src/postcss-plugins/nesting/README.md
@@ -0,0 +1,42 @@
+# tailwindcss/nesting
+
+This is a PostCSS plugin that wraps [postcss-nested](https://github.com/postcss/postcss-nested) or [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) and acts as a compatibility layer to make sure your nesting plugin of choice properly understands Tailwind's custom syntax like `@apply` and `@screen`.
+
+Add it to your PostCSS configuration, somewhere before Tailwind itself:
+
+```js
+// postcss.config.js
+module.exports = {
+ plugins: [
+ require('postcss-import'),
+ require('tailwindcss/nesting'),
+ require('tailwindcss'),
+ require('autoprefixer'),
+ ]
+}
+```
+
+By default, it uses the [postcss-nested](https://github.com/postcss/postcss-nested) plugin under the hood, which uses a Sass-like syntax and is the plugin that powers nesting support in the [Tailwind CSS plugin API](https://tailwindcss.com/docs/plugins#css-in-js-syntax).
+
+If you'd rather use [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) (which is based on the work-in-progress [CSS Nesting](https://drafts.csswg.org/css-nesting-1/) specification), first install the plugin alongside:
+
+```shell
+npm install postcss-nesting
+```
+
+Then pass the plugin itself as an argument to `tailwindcss/nesting` in your PostCSS configuration:
+
+```js
+// postcss.config.js
+module.exports = {
+ plugins: [
+ require('postcss-import'),
+ require('tailwindcss/nesting')(require('postcss-nesting')),
+ require('tailwindcss'),
+ require('autoprefixer'),
+ ]
+}
+```
+
+This can also be helpful if for whatever reason you need to use a very specific version of `postcss-nested` and want to override the version we bundle with `tailwindcss/nesting` itself.
+