Comparing version 0.1.1 to 0.1.2
// Keep track of which styles have been added | ||
// keyed by hash of a rule set or file name | ||
// (keyed by hash of a rule set or file path) | ||
const cache = {} | ||
@@ -22,5 +22,3 @@ | ||
// Prefix every rule in the file with the uid and append style | ||
sheet.innerHTML += str.match(/.*([^{])\s*\{\s*([^}]*?)\s*}/gi) | ||
.map(rule => `.${className} ${rule}`) | ||
.join('\n') | ||
sheet.innerHTML += str.replace(/(^[^@\s}]*\s*{)/gm, `\n.${className} $1`) | ||
}) | ||
@@ -27,0 +25,0 @@ } |
{ | ||
"name": "csz", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Super lightweight CSS module like behavior at runtime", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6624
108