Gathering detailed insights and metrics for reactcss-extra
Gathering detailed insights and metrics for reactcss-extra
Gathering detailed insights and metrics for reactcss-extra
Gathering detailed insights and metrics for reactcss-extra
npm install reactcss-extra
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
25 Commits
1 Watching
1 Branches
1 Contributors
Updated on 18 May 2021
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
366.7%
14
Compared to previous week
Last month
25%
25
Compared to previous month
Last year
-10.5%
366
Compared to previous year
ReactCSS with some extra features
The original version of ReactCSS by casesandberg can be found here (github)
The use of lodash has changed. Now only the necessary lodash sub-modules are imported instead of the entire lodash module.
Added a new function styleMerge
which allows for combining multiple ReactCSS styles (can provide any number of styles):
1const divColours = reactCSSExtra({ 2 "default": { 3 div: { 4 color: "red", 5 }, 6 }, 7}); 8 9const divFontSize = reactCSSExtra({ 10 "default": { 11 div: { 12 fontSize: "48px", 13 }, 14 }, 15}); 16 17const combined = styleMerge(false, divColours, divFontSize); 18//--------------- 19/* 20* { 21* div: { 22* color: "red", 23* fontSize: "48px" 24* } 25* } 26*/ 27 28const combinedWithoutDivKey = styleMerge(true, divColours, divFontSize); 29//--------------- 30/* 31* { 32* color: "red", 33* fontSize: "48px" 34* } 35*/
reactCSS
was changed to allow for keys to be left out of activating classes (and to allow for styles to be left out, too)1const styles = reactCSSExtra({
2 "default": {
3 div1: {
4 fontWeight: "200",
5 fontSize: "30px",
6 },
7 div2: {
8 fontWeight: "400",
9 }
10 },
11 "heavy": {
12 div1: {
13 fontWeight: "400",
14 //fontSize doesn't need to be specified again, it will just inherit "30px" from above
15 },
16 //div2 doesn't need to be specified again, it will just inherit from above
17 }
18}, {
19 "heavy": true,
20});
21//---------------
22/*
23* {
24* div1: {
25* fontWeight: "400"
26* fontSize: "30px",
27* },
28* div2: {
29* fontWeight: "400",
30* }
31* }
32*/
reactCSS
became reactCSSExtra
styleMerge
typings (when destroyTopLevelKeys
was true
) I also fixed when destroyTopLevelKeys
was false
NOTE: For instance when D = styleMerge(false, X, Y)
, D
will inherit keys from X, so just be careful!styleMerge
typings. Made them more optimised and fixed? it even though I don't know whether it was actually broken.Added proper typings for the styleMerge
function. It no longer just returns object
but actually the combined objects provided. It also removed the keys if you specify, but it's pretty unoptimised.
Fixed typings for reactCSSExtra
. An attribute like position that used the type "absolute" | "relative" | ...
rather than just string
would error because string is not assignable to type "absolute" | "relative" | ...
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
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
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