Cumulative downloads
Total Downloads
Last day
2.9%
3,479,888
Compared to previous day
Last week
5.8%
17,992,144
Compared to previous week
Last month
-1.2%
74,517,029
Compared to previous month
Last year
-7.7%
896,980,424
Compared to previous year
1
1
Transforms:
:local(.continueButton) { color: green; }
into:
:export { continueButton: __buttons_continueButton_djd347adcxz9; } .__buttons_continueButton_djd347adcxz9 { color: green; }
so it doesn't pollute CSS global scope and can be simply used in JS like so:
import styles from "./buttons.css"; elem.innerHTML = `<button class="${styles.continueButton}">Continue</button>`;
Since we're exporting class names, there's no reason to export only one. This can give us some really useful reuse of styles:
.globalButtonStyle { background: white; border: 1px solid; border-radius: 0.25rem; } .globalButtonStyle:hover { box-shadow: 0 0 4px -2px; } :local(.continueButton) { compose-with: globalButtonStyle; color: green; }
becomes:
.globalButtonStyle {
background: white;
border: 1px solid;
border-radius: 0.25rem;
}
.globalButtonStyle:hover {
box-shadow: 0 0 4px -2px;
}
:local(.continueButton) {
compose-with: globalButtonStyle;
color: green;
}
Note: you can also use composes
as a shorthand for compose-with
You're looking for CSS Modules. It uses this plugin as well as a few others, and it's amazing.
npm install
npm test
npm test:watch
will watch src
and test
for changes and run the testsISC
Glen Maddern, 2015.
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 6/21 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
no effort to earn an OpenSSF best practices badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-09-09
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 Morepostcss-modules-local-by-default
A CSS Modules transform to make local scope the default
generic-names
Helper for building generic names, similar to webpack
@koga73/postcss-modules-scope
A CSS Modules transform to extract export statements from local-scope classes
@types/postcss-modules-scope
TypeScript definitions for postcss-modules-scope