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
@types/postcss-modules-local-by-default
TypeScript definitions for postcss-modules-local-by-default
@beisen/postcss-modules-local-by-default
A CSS Modules transform to make local scope the default
@jtmi/postcss-modules-local-by-default
君土母语编程小程序 A CSS Modules transform to make local scope the default
PostCSS plugin for css modules to local-scope classes and ids
npm install postcss-modules-local-by-default
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
4,749,727,025
Last Day
910,403
Last Week
19,426,157
Last Month
84,854,879
Last Year
942,518,837
MIT License
27 Stars
194 Commits
14 Forks
4 Watchers
1 Branches
24 Contributors
Updated on Mar 18, 2025
Latest Version
4.2.0
Package Id
postcss-modules-local-by-default@4.2.0
Unpacked Size
25.71 kB
Size
7.18 kB
File Count
4
NPM Version
9.6.0
Node Version
22.11.0
Published on
Dec 11, 2024
Cumulative downloads
Total Downloads
Last Day
-14.7%
910,403
Compared to previous day
Last Week
-9.8%
19,426,157
Compared to previous week
Last Month
2.2%
84,854,879
Compared to previous month
Last Year
-0.2%
942,518,837
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 a /* cssmodules-pure-ignore */
comment in front
of the selector:
1/* cssmodules-pure-ignore */ 2:global(#modal-backdrop) { 3 ...; 4}
or by adding a /* cssmodules-pure-no-check */
comment at the top of a file to disable this check for the whole file:
1/* cssmodules-pure-no-check */ 2 3:global(#modal-backdrop) { 4 ...; 5} 6 7:global(#my-id) { 8 ...; 9}
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
7 existing vulnerabilities detected
Details
Reason
Found 6/27 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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 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 More