Skip to content

Commit e7f36df

Browse files
committed
Comments
#1634
1 parent a724170 commit e7f36df

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/components/src/theme/ThemeUtils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ export function calculatePreloadStyleContent(): CssVariableStyleContent {
5858

5959
/**
6060
* Create a resolver function for calculating the value of a css variable based
61-
* on a given element's computed style.
61+
* on a given element's computed style. If the variable resolves to '', we check
62+
* DEFAULT_PRELOAD_DATA_VARIABLES for a default value, and if one does not exist,
63+
* return ''.
6264
* @param el Element to resolve css variables against
6365
*/
6466
export function createCssVariableResolver(
@@ -396,8 +398,8 @@ export function preloadTheme(): void {
396398
}
397399

398400
/**
399-
* Inline SVGs cannot depend on dynamic CSS variables, so we have to explicitly
400-
* change them.
401+
* Inline SVGs cannot depend on dynamic CSS variables, so we have to statically
402+
* update them if we want to change their color.
401403
*
402404
* This function:
403405
* 1. Clears any previous overrides

0 commit comments

Comments
 (0)