From f07a3ea5b5b05ca6afd9ee4df6ecbb457f60127d Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 25 Mar 2022 15:48:32 +0530 Subject: [PATCH] Remove css specific syntax from map --- scripts/postcss/css-url-to-variables.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/postcss/css-url-to-variables.js b/scripts/postcss/css-url-to-variables.js index 902e3e9d..dff72264 100644 --- a/scripts/postcss/css-url-to-variables.js +++ b/scripts/postcss/css-url-to-variables.js @@ -33,7 +33,7 @@ function extractUrl(decl) { } const urlStringNode = node.nodes[0]; const variableName = `${idToPrepend}-${counter++}`; - urlVariables.set(variableName, `"${urlStringNode.value}"`); + urlVariables.set(variableName, urlStringNode.value); const varNode = { type: "function", value: "var", @@ -49,7 +49,7 @@ function addResolvedVariablesToRootSelector(root, { Rule, Declaration }) { const newRule = new Rule({ selector: ":root", source: root.source }); // Add derived css variables to :root urlVariables.forEach((value, key) => { - const declaration = new Declaration({ prop: `--${key}`, value }); + const declaration = new Declaration({ prop: `--${key}`, value: `"${value}"`}); newRule.append(declaration); }); root.append(newRule);