Comparing version 2.3.0 to 2.3.1
{ | ||
"name": "style-mod", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "A minimal CSS module shim", | ||
@@ -5,0 +5,0 @@ "main": "dist/style-mod.cjs", |
@@ -28,2 +28,6 @@ function sym(name, random) { | ||
let style = spec[name], specificity = style.specificity || 0 | ||
if (/^@/.test(name)) { | ||
this[RULES].push(name + " {" + renderAt(style) + "}") | ||
continue | ||
} | ||
let id = StyleModule.newName(), selector = name | ||
@@ -148,2 +152,13 @@ if ((options && options.generateClasses) !== false) { | ||
function renderAt(spec) { | ||
let result = "" | ||
for (let prop in spec) { | ||
if (result) result += /}$/.test(result) ? " " : "; " | ||
let val = spec[prop] | ||
if (typeof val == "object") result += prop + " {" + renderAt(val) + "}" | ||
else result += prop + ": " + val | ||
} | ||
return result | ||
} | ||
// Style::Object<union<Style,string>> | ||
@@ -150,0 +165,0 @@ // |
Sorry, the diff of this file is not supported yet
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
24732
440