From 74e84ec7699dd5d52b50147d2e805cfc10c6d758 Mon Sep 17 00:00:00 2001 From: Talon Poole Date: Mon, 22 Feb 2021 00:35:38 +0000 Subject: [PATCH] fix css options --- cli.js | 2 +- css.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, }); }),