From a164b707b085b64466a77f569e103a56b0448b01 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Wed, 22 Nov 2023 10:18:53 -0600 Subject: [PATCH] Comments #1634 --- packages/components/src/theme/ThemeUtils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/components/src/theme/ThemeUtils.ts b/packages/components/src/theme/ThemeUtils.ts index a980bee22b..398fa453a3 100644 --- a/packages/components/src/theme/ThemeUtils.ts +++ b/packages/components/src/theme/ThemeUtils.ts @@ -58,7 +58,9 @@ export function calculatePreloadStyleContent(): CssVariableStyleContent { /** * Create a resolver function for calculating the value of a css variable based - * on a given element's computed style. + * on a given element's computed style. If the variable resolves to '', we check + * DEFAULT_PRELOAD_DATA_VARIABLES for a default value, and if one does not exist, + * return ''. * @param el Element to resolve css variables against */ export function createCssVariableResolver( @@ -396,8 +398,8 @@ export function preloadTheme(): void { } /** - * Inline SVGs cannot depend on dynamic CSS variables, so we have to explicitly - * change them. + * Inline SVGs cannot depend on dynamic CSS variables, so we have to statically + * update them if we want to change their color. * * This function: * 1. Clears any previous overrides