Skip to content

Commit

Permalink
Reduce body _pollution_ with design tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Aug 9, 2024
1 parent 9a3cc79 commit 26c26dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/components/src/utilities/theme/applyTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ export function applyJupyterTheme(): void {
}
}
}
baseLayerLuminance.setValueFor(
document.body,
baseLayerLuminance.withDefault(
isDark_ ? StandardLuminance.DarkMode : StandardLuminance.LightMode
);

Expand All @@ -234,7 +233,7 @@ export function applyJupyterTheme(): void {
isDark_
);
if (parsedValue !== null) {
toolkitTokenName.token.setValueFor(document.body, parsedValue);
toolkitTokenName.token.withDefault(parsedValue);
} else {
console.error(
`Fail to parse value '${value}' for '${jpTokenName}' as FAST design token.`
Expand Down

0 comments on commit 26c26dd

Please sign in to comment.