From f732164b5fb253ad1dfe88e05d50ffdcfba2df8a Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 10 Mar 2022 17:21:38 +0530 Subject: [PATCH] Formatting change --- postcss/css-compile-variables.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/postcss/css-compile-variables.js b/postcss/css-compile-variables.js index 38f5c471..cf2b451d 100644 --- a/postcss/css-compile-variables.js +++ b/postcss/css-compile-variables.js @@ -61,16 +61,16 @@ function extractAlias(decl) { } } -function addResolvedVariablesToRootSelector(root, variables, { Rule, Declaration }) { +function addResolvedVariablesToRootSelector(root, variables, {Rule, Declaration}) { const newRule = new Rule({ selector: ":root", source: root.source }); // Add base css variables to :root for (const [key, value] of Object.entries(variables)) { - const declaration = new Declaration({ prop: `--${key}`, value }); + const declaration = new Declaration({prop: `--${key}`, value}); newRule.append(declaration); } // Add derived css variables to :root resolvedMap.forEach((value, key) => { - const declaration = new Declaration({ prop: key, value }); + const declaration = new Declaration({prop: key, value}); newRule.append(declaration); }); root.append(newRule); @@ -94,7 +94,7 @@ module.exports = (opts = {}) => { return { postcssPlugin: "postcss-compile-variables", - Once(root, { Rule, Declaration }) { + Once(root, {Rule, Declaration}) { /* Go through the CSS file once to extract all aliases. We use the extracted alias when resolving derived variables @@ -102,7 +102,7 @@ module.exports = (opts = {}) => { */ root.walkDecls(decl => extractAlias(decl)); root.walkDecls(decl => resolveDerivedVariable(decl, opts)); - addResolvedVariablesToRootSelector(root, opts.variables, { Rule, Declaration }); + addResolvedVariablesToRootSelector(root, opts.variables, {Rule, Declaration}); }, }; };