{"library":"postcss-nested-once","title":"postcss-nested-once","description":"PostCSS plugin that unwraps nested CSS rules (Sass-like), specifically designed to work correctly with CSS Modules in rollup-plugin-styles. Version 1.0.0, stable. Unlike postcss-nested, it processes nested selectors with the ampersand (&) before CSS Modules scope resolution, ensuring exported class names like `list_item` are generated correctly. It uses the Once hook and the `@nest` at-rule behavior. Ships TypeScript types.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install postcss-nested-once"],"cli":null},"imports":["import postcssNestedOnce from 'postcss-nested-once'","postcssNestedOnce() in PostCSS plugins array","const postcssNestedOnce = require('postcss-nested-once')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport styles from 'rollup-plugin-styles';\nimport postcssNestedOnce from 'postcss-nested-once';\n\nexport default {\n  plugins: [\n    styles({\n      mode: 'inject',\n      modules: true,\n      plugins: [\n        postcssNestedOnce(),\n      ],\n    }),\n  ],\n};","lang":"javascript","description":"Shows how to configure rollup-plugin-styles with postcss-nested-once for CSS Modules support with nested ampersand selectors.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}