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.1.10 to 10.2.0

dist/index.d.ts

4

package.json
{
"name": "postcss-nesting",
"description": "Nest rules inside each other in CSS",
"version": "10.1.10",
"version": "10.2.0",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",

@@ -16,2 +16,3 @@ "license": "CC0-1.0",

"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"jsdelivr": "dist/index.mjs",

@@ -45,3 +46,2 @@ "unpkg": "dist/index.mjs",

"prepublishOnly": "npm run clean && npm run build && npm run test",
"stryker": "stryker run --logLevel error",
"test": "node .tape.mjs && npm run test:exports",

@@ -48,0 +48,0 @@ "test:deno": "deno run --unstable --allow-env --allow-read test/deno/test.js",

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

a, b {
color: red;
color: red;
& c, & d {
color: white;
}
/* "&" comes first */
& c, & d {
color: white;
}
/* "&" comes later, requiring "@nest" */
@nest e & {
color: yellow;
}
}

@@ -24,8 +30,12 @@

a, b {
color: red;
color: red;
}
a c, a d, b c, b d {
color: white;
color: white;
}
e a, e b {
color: yellow;
}
```

@@ -41,13 +51,5 @@

Use [PostCSS Nesting] to process your CSS:
Use [PostCSS Nesting] as a [PostCSS] plugin:
```js
import postcssNesting from 'postcss-nesting';
postcssNesting.process(YOUR_CSS /*, processOptions, pluginOptions */);
```
Or use it as a [PostCSS] plugin:
```js
import postcss from 'postcss';

@@ -180,4 +182,4 @@ import postcssNesting from 'postcss-nesting';

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

@@ -184,0 +186,0 @@

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