Gathering detailed insights and metrics for postcss-modules-local-by-default
Gathering detailed insights and metrics for postcss-modules-local-by-default
Gathering detailed insights and metrics for postcss-modules-local-by-default
Gathering detailed insights and metrics for postcss-modules-local-by-default
PostCSS plugin for css modules to local-scope classes and ids
npm install postcss-modules-local-by-default
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
26 Stars
191 Commits
13 Forks
5 Watching
1 Branches
24 Contributors
Updated on 17 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.9%
3,437,905
Compared to previous day
Last week
0.7%
19,404,979
Compared to previous week
Last month
9.2%
81,797,127
Compared to previous month
Last year
-6.2%
922,378,921
Compared to previous year
1
Transformation examples:
Selectors (mode local
, by default)::
1.foo { ... } /* => */ :local(.foo) { ... } 2 3.foo .bar { ... } /* => */ :local(.foo) :local(.bar) { ... } 4 5/* Shorthand global selector */ 6 7:global .foo .bar { ... } /* => */ .foo .bar { ... } 8 9.foo :global .bar { ... } /* => */ :local(.foo) .bar { ... } 10 11/* Targeted global selector */ 12 13:global(.foo) .bar { ... } /* => */ .foo :local(.bar) { ... } 14 15.foo:global(.bar) { ... } /* => */ :local(.foo).bar { ... } 16 17.foo :global(.bar) .baz { ... } /* => */ :local(.foo) .bar :local(.baz) { ... } 18 19.foo:global(.bar) .baz { ... } /* => */ :local(.foo).bar :local(.baz) { ... }
Declarations (mode local
, by default):
1.foo { 2 animation-name: fadeInOut, global(moveLeft300px), local(bounce); 3} 4 5.bar { 6 animation: rotate 1s, global(spin) 3s, local(fly) 6s; 7} 8 9/* => */ 10 11:local(.foo) { 12 animation-name: :local(fadeInOut), moveLeft300px, :local(bounce); 13} 14 15:local(.bar) { 16 animation: :local(rotate) 1s, spin 3s, :local(fly) 6s; 17}
In pure mode, all selectors must contain at least one local class or id selector
To ignore this rule for a specific selector, add the following comment in front of the selector:
1/* cssmodules-pure-ignore */ 2:global(#modal-backdrop) { 3 ...; 4}
1$ npm install 2$ npm test
1$ yarn test:watch
MIT
Mark Dalgleish, 2015.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
license file detected
Details
Reason
8 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 8
Reason
5 existing vulnerabilities detected
Details
Reason
Found 5/27 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
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