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 10.0.0 to 10.0.1

4

package.json

@@ -5,3 +5,3 @@ {

"license": "CC0-1.0",
"version": "10.0.0",
"version": "10.0.1",
"type": "module",

@@ -30,3 +30,3 @@ "main": "dist/index.cjs",

"scripts": {
"prepublishOnly": "npm test",
"prepublishOnly": "npm run build && npm test",
"build": "rollup -c .rollup.js",

@@ -33,0 +33,0 @@ "test": "node .bin/test.js",

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

[PostCSS Nesting] lets you nest style rules inside each other, following the
[CSS Nesting] specification.
[CSS Nesting] specification. If you want nested rules the same way [Sass] works
you might want to use [PostCSS Nested] instead.

@@ -75,61 +76,8 @@ ```pcss

## Options
### ⚠️ Spec disclaimer
### allowDeclarationsAfterNestedRules
The [CSS Nesting Module] spec states on nesting that "Declarations occuring after a nested rule are invalid and ignored.".
While we think it makes sense on browsers, enforcing this at the plugin level introduces several constrains that would
interfere with PostCSS' plugin nature such as with `@mixin`
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

@@ -148,1 +96,4 @@ [cli-url]: https://travis-ci.org/csstools/postcss-nesting

[Deno]: https://deno.land/x/postcss_nesting
[PostCSS Nested]: https://github.com/postcss/postcss-nested
[Sass]: https://sass-lang.com/
[CSS Nesting Module]: https://www.w3.org/TR/css-nesting-1/

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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