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
63.9
Supply Chain
96.9
Quality
80.6
Maintenance
100
Vulnerability
100
License
CSS (43.39%)
JavaScript (30.21%)
TypeScript (22.76%)
HTML (3.06%)
Nunjucks (0.48%)
Shell (0.1%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
3,754
Last Day
1
Last Week
9
Last Month
48
Last Year
1,156
MIT-0 License
933 Stars
4,173 Commits
73 Forks
11 Watchers
4 Branches
131 Contributors
Updated on Feb 12, 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
Last Day
0%
1
Compared to previous day
Last Week
-47.1%
9
Compared to previous week
Last Month
-21.3%
48
Compared to previous month
Last Year
-31.9%
1,156
Compared to previous year
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 9 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
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 0/21 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-02-10
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 More