postcss-nested

  • Version 8.0.1
  • Published
  • 14.6 kB
  • 1 dependency
  • MIT license

Install

npm i postcss-nested
yarn add postcss-nested
pnpm add postcss-nested

Overview

PostCSS plugin to unwrap nested rules like how Sass does it

Index

Variables

Namespaces

Variables

variable nested

let nested: PluginCreator<nested.Options>;

    Namespaces

    namespace nested

    namespace nested {}

      interface Options

      interface Options {}

        property bubble

        bubble?: string[];
        • By default, plugin will bubble only @media, @supports and @layer at-rules. Use this option to add your custom at-rules to this list.

        property preserveEmpty

        preserveEmpty?: boolean;
        • By default, plugin will strip out any empty selector generated by intermediate nesting levels. You can set this option to true to preserve them.

        property rootRuleName

        rootRuleName?: string;
        • The plugin supports the SCSS custom at-rule @at-root which breaks rule blocks out of their nested position. If you want, you can choose a new custom name for this rule in your code.

        property unwrap

        unwrap?: string[];
        • By default, plugin will unwrap only @font-face, @keyframes, and @document at-rules. You can add your custom at-rules to this list by this option.

        type Nested

        type Nested = PluginCreator<Options>;

          Package Files (1)

          Dependencies (1)

          Dev Dependencies (0)

          No dev dependencies.

          Peer Dependencies (1)

          Badge

          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/postcss-nested.

          • Markdown
            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/postcss-nested)
          • HTML
            <a href="https://www.jsdocs.io/package/postcss-nested"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>