postcss-nesting
Advanced tools
Comparing version 10.1.10 to 10.2.0
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24
196
1
27912
99
1