Skip to content

Commit 4550bef

Browse files
committed
chore: Inline style improvement
1 parent 0fc2f42 commit 4550bef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/ui/styling/style-scope.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ function resolveFilePathFromImport(importSource: string, fileName: string): stri
11411141
export const applyInlineStyle = profile(function applyInlineStyle(view: ViewBase, styleStr: string) {
11421142
const localStyle = `local { ${styleStr} }`;
11431143
const inlineRuleSet = CSSSource.fromSource(localStyle).selectors;
1144+
const cssVarResolveCallback = (cssVarName: string) => view.style.getCssVariable(cssVarName);
11441145

11451146
// Reset unscoped css-variables
11461147
view.style.resetUnscopedCssVariables();
@@ -1163,7 +1164,7 @@ export const applyInlineStyle = profile(function applyInlineStyle(view: ViewBase
11631164
return;
11641165
}
11651166

1166-
const value = evaluateCssExpressions(view, property, d.value, (cssVarName) => view.style.getCssVariable(cssVarName));
1167+
const value = evaluateCssExpressions(view, property, d.value, cssVarResolveCallback);
11671168
if (property in view.style) {
11681169
view.style[property] = value;
11691170
} else {

0 commit comments

Comments
 (0)