From 4350d2f264927bf655793a178e37ecdff8213494 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 1 Apr 2022 16:20:58 +0530 Subject: [PATCH] Don't derive variables for runtime theme --- scripts/postcss/css-compile-variables.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/postcss/css-compile-variables.js b/scripts/postcss/css-compile-variables.js index b48fc8fa..f7d63fab 100644 --- a/scripts/postcss/css-compile-variables.js +++ b/scripts/postcss/css-compile-variables.js @@ -113,6 +113,11 @@ module.exports = (opts = {}) => { postcssPlugin: "postcss-compile-variables", Once(root, {Rule, Declaration, result}) { + const cssFileLocation = root.source.input.from; + if (cssFileLocation.includes("type=runtime")) { + // If this is a runtime theme, don't derive variables. + return; + } /* Go through the CSS file once to extract all aliases and base variables. We use these when resolving derived variables later.