Socket
Socket
Sign inDemoInstall

postcss-nesting

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-nesting - npm Package Compare versions

Comparing version 9.0.0 to 10.0.0

dist/index.cjs

53

package.json

@@ -5,8 +5,8 @@ {

"license": "CC0-1.0",
"version": "9.0.0",
"version": "10.0.0",
"type": "module",
"main": "postcss-8-nesting/postcss-nesting.cjs",
"module": "postcss-8-nesting/postcss-nesting.mjs",
"jsdelivr": "postcss-8-nesting/postcss-nesting.mjs",
"unpkg": "postcss-8-nesting/postcss-nesting.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"jsdelivr": "dist/index.mjs",
"unpkg": "dist/index.mjs",
"publishConfig": {

@@ -21,33 +21,27 @@ "access": "public"

".": {
"import": "./postcss-8-nesting/postcss-nesting.mjs",
"require": "./postcss-8-nesting/postcss-nesting.cjs",
"default": "./postcss-8-nesting/postcss-nesting.mjs"
},
"./postcss-7-nesting": {
"import": "./postcss-7-nesting/postcss-nesting.mjs",
"require": "./postcss-7-nesting/postcss-nesting.cjs",
"default": "./postcss-7-nesting/postcss-nesting.mjs"
},
"./postcss-8-nesting": {
"import": "./postcss-8-nesting/postcss-nesting.mjs",
"require": "./postcss-8-nesting/postcss-nesting.cjs",
"default": "./postcss-8-nesting/postcss-nesting.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"default": "./dist/index.mjs"
}
},
"files": [
"postcss-7-nesting",
"postcss-8-nesting"
"dist"
],
"scripts": {
"prepublishOnly": "npm test",
"build": "node .bin/build.js",
"build": "rollup -c .rollup.js",
"test": "node .bin/test.js",
"test:lint": "node .bin/test-lint.js",
"test:tape": "node .bin/test-tape.js"
"test:tape": "node .bin/test-tape.js",
"test:deno": "deno run --unstable --allow-env --allow-read .bin/test-deno.js"
},
"devDependencies": {
"esbuild": "0.13.9",
"eslint": "8.1.0",
"eslint-config-dev": "2.0.0",
"nodemon": "2.0.14",
"@babel/core": "^7.15.8",
"@babel/preset-env": "^7.15.8",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.0.6",
"eslint": "^8.1.0",
"rollup": "^2.58.3",
"rollup-plugin-terser": "^7.0.2",
"postcss": "8.3.11",

@@ -60,3 +54,3 @@ "pre-commit": "1.2.2"

"engines": {
"node": "12 - 16"
"node": ">= 12"
},

@@ -123,3 +117,6 @@ "eslintConfig": {

"csswg"
]
],
"dependencies": {
"postcss-selector-parser": "6.0.6"
}
}

@@ -31,7 +31,2 @@ # PostCSS Nesting [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]

**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

@@ -80,2 +75,61 @@

## Options
### allowDeclarationsAfterNestedRules
The [specification](https://www.w3.org/TR/css-nesting-1/#mixing) does not allow declarations after nested rules.
This was previously supported by this plugin and can be re-enabled with `allowDeclarationsAfterNestedRules`.
Before :
```css
a {
color: red;
& b {
color: white;
}
padding: 20px;
}
```
After **without** the option :
```js
postcssNesting()
```
```css
a {
color: red;
}
a b {
color: white;
}
```
After **with** the option :
```js
postcssNesting({
allowDeclarationsAfterNestedRules: true
})
```
```css
a {
color: red;
}
a b {
color: white;
}
a {
padding: 20px;
}
```
[cli-img]: https://img.shields.io/travis/csstools/postcss-nesting.svg

@@ -82,0 +136,0 @@ [cli-url]: https://travis-ci.org/csstools/postcss-nesting

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc