Gathering detailed insights and metrics for @csstools/postcss-nesting-experimental
Gathering detailed insights and metrics for @csstools/postcss-nesting-experimental
Gathering detailed insights and metrics for @csstools/postcss-nesting-experimental
Gathering detailed insights and metrics for @csstools/postcss-nesting-experimental
npm install @csstools/postcss-nesting-experimental
Typescript
Module System
Min. Node Version
Node Version
NPM Version
CSS (43.25%)
JavaScript (30.24%)
TypeScript (22.9%)
HTML (3.03%)
Nunjucks (0.48%)
Shell (0.1%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT-0 License
982 Stars
4,379 Commits
78 Forks
9 Watchers
6 Branches
132 Contributors
Updated on Jul 04, 2025
Minified
Minified + Gzipped
Latest Version
3.0.1
Package Id
@csstools/postcss-nesting-experimental@3.0.1
Unpacked Size
17.87 kB
Size
5.80 kB
File Count
6
NPM Version
10.7.0
Node Version
22.1.0
Published on
Oct 23, 2024
Cumulative downloads
Total Downloads
1
1
PostCSS Nesting Experimental lets you nest style rules inside each other, following the CSS Nesting specification. If you want nested rules the same way Sass works you might want to use PostCSS Nested instead.
[!WARNING] Experimental version of PostCSS Nesting
1a, b { 2 color: red; 3 4 & c, & d { 5 color: white; 6 } 7 8 :is(e) & { 9 color: yellow; 10 } 11} 12 13& { 14 color: pink; 15} 16 17 18/* becomes */ 19 20a, b { 21 color: red; 22} 23 24:is(a,b) c, :is(a,b) d { 25 color: white; 26 } 27 28:is(e) :is(a,b) { 29 color: yellow; 30 } 31 32:scope { 33 color: pink; 34}
Relative selectors :
1.parent { 2 color: red; 3 4 .child { 5 color: white; 6 } 7 8 > .other-child { 9 color: yellow; 10 } 11} 12 13/* becomes */ 14 15.parent { 16 color: red; 17} 18 19:is(.parent) .child { 20 color: white; 21} 22 23:is(.parent)> .other-child { 24 color: yellow; 25}
Add PostCSS Nesting Experimental to your project:
1npm install @csstools/postcss-nesting-experimental --save-dev
Use PostCSS Nesting Experimental as a PostCSS plugin:
1import postcss from 'postcss'; 2import postcssNestingExperimental from '@csstools/postcss-nesting-experimental'; 3 4postcss([ 5 postcssNestingExperimental(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
PostCSS Nesting Experimental runs in all Node environments, with special instructions for:
Node | Webpack | Gulp | Grunt |
---|
The CSS Nesting specification 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
No vulnerabilities found.
Reason
30 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
1 existing vulnerabilities detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 1/24 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year