fix css options

This commit is contained in:
Talon Poole 2021-02-22 00:35:38 +00:00
parent 15f3538fe8
commit 74e84ec769
2 changed files with 2 additions and 2 deletions

2
cli.js
View file

@ -82,7 +82,7 @@ const cli = yargs(process.argv.slice(2))
});
// TODO: checks for any .css arg, instead of parsing --css
const css = process.argv.find(arg => /\.css$/.test(arg)) || "gmi-web.css"
const css = process.argv.find((arg) => /\.css$/.test(arg)) || "gmi-web.css";
const CSS_VARS = CSS.rootVariables(CSS.load({ css }));
Object.keys(CSS_VARS).forEach((key) => {
const opt = key.replace("--", "");

2
css.js
View file

@ -92,7 +92,7 @@ function reduceVariables(rules, options) {
.key || key;
return Object.assign(declaration, {
value: key
? options[key] || defaultVariables[key]
? options[key.replace("--", "")] || defaultVariables[key]
: declaration.value,
});
}),