diff --git a/cli.js b/cli.js index c9d91c7..b90d05e 100755 --- a/cli.js +++ b/cli.js @@ -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("--", ""); diff --git a/css.js b/css.js index 0b8beca..8046951 100644 --- a/css.js +++ b/css.js @@ -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, }); }),