postcss-nesting

WebJar for postcss-nesting

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

postcss-nesting
Last Version

Last Version

4.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

postcss-nesting
WebJar for postcss-nesting
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jonathantneal/postcss-nesting

Download postcss-nesting

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/postcss-nesting/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>postcss-nesting</artifactId>
    <version>4.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-nesting/
implementation 'org.webjars.npm:postcss-nesting:4.2.1'
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-nesting/
implementation ("org.webjars.npm:postcss-nesting:4.2.1")
'org.webjars.npm:postcss-nesting:jar:4.2.1'
<dependency org="org.webjars.npm" name="postcss-nesting" rev="4.2.1">
  <artifact name="postcss-nesting" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='postcss-nesting', version='4.2.1')
)
libraryDependencies += "org.webjars.npm" % "postcss-nesting" % "4.2.1"
[org.webjars.npm/postcss-nesting "4.2.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : postcss jar [6.0.11,7)

Project Modules

There are no modules declared in this project.

PostCSS Nesting PostCSS

NPM Version CSS Standard Status Build Status Support Chat

PostCSS Nesting lets you nest style rules inside each other, following the CSS Nesting specification.

a, b {
  color: red;

  & c, & d {
    color: white;
  }
}

/* becomes */

a, b {
  color: red;
}

a c, a d, b c, b d {
  color: white;
}

NOTICE: In a future version of this project, nesting at-rules like @media may be deprecated, as they are not part of the nesting proposal. In a comment, a CSSWG member expressed interest in handling nested @media while handling selector nesting. So deprecating nested at-rules has been temporarily delayed.

Usage

Add PostCSS Nesting to your project:

npm install postcss-nesting --save-dev

Use PostCSS Nesting to process your CSS:

import postcssNesting from 'postcss-nesting';

postcssNesting.process(YOUR_CSS /*, processOptions, pluginOptions */);

Or use it as a PostCSS plugin:

import postcss from 'postcss';
import postcssNesting from 'postcss-nesting';

postcss([
  postcssNesting(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Nesting runs in all Node environments, with special instructions for:

Node Webpack Create React App Gulp Grunt

Versions

Version
4.2.1