From 8916563d5415ee92c1f5fc4ec41a4c27d512d444 Mon Sep 17 00:00:00 2001 From: Geoff Rich <4992896+geoffrich@users.noreply.github.com> Date: Wed, 23 Feb 2022 08:14:41 -0800 Subject: [PATCH] Add explanatory comment --- src/compiler/compile/css/Stylesheet.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/compile/css/Stylesheet.ts b/src/compiler/compile/css/Stylesheet.ts index 7f0c0b52ca..0a3098db6d 100644 --- a/src/compiler/compile/css/Stylesheet.ts +++ b/src/compiler/compile/css/Stylesheet.ts @@ -145,6 +145,8 @@ class Declaration { ? this.node.value.children[0] : this.node.value; + // Don't minify whitespace in custom properties, since some browsers (Chromium < 99) + // treat --foo: ; and --foo:; differently if (first.type === 'Raw' && /^\s+$/.test(first.value)) return; let start = first.start;