Skip to content

Commit fa3a2ec

Browse files
DenisaCGhbcarlos
authored andcommitted
changed syntax for getting CSS values
1 parent 3ea85bd commit fa3a2ec

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/utils.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,17 @@ export function define_jupyter_theme() : Blockly.Theme{
359359
var jupyterlab_theme = Blockly.Theme.defineTheme('jupyterlab', {
360360
'base': Blockly.Themes.Classic,
361361
'componentStyles': {
362-
'workspaceBackgroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-layout-color0'),
363-
'toolboxBackgroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-layout-color2'),
364-
'toolboxForegroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-ui-font-color0'),
365-
'flyoutBackgroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-border-color2'),
366-
'flyoutForegroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-layout-color3'),
362+
'workspaceBackgroundColour': 'var(--jp-layout-color0)',
363+
'toolboxBackgroundColour': 'var(--jp-layout-color2)',
364+
'toolboxForegroundColour': 'var(--jp-ui-font-color0)',
365+
'flyoutBackgroundColour': 'var(--jp-border-color2)',
366+
'flyoutForegroundColour': 'var(--jp-layout-color3)',
367367
'flyoutOpacity': 1,
368-
'scrollbarColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-border-color0'),
369-
'insertionMarkerColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-warn-color-active'),
368+
'scrollbarColour': 'var(--jp-border-color0)',
369+
'insertionMarkerColour': 'var(--jp-warn-color-active)',
370370
'insertionMarkerOpacity': 0.3,
371371
'scrollbarOpacity': 0.4,
372-
'cursorColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-scrollbar-background-color'),
372+
'cursorColour': 'var(--jp-scrollbar-background-color)',
373373
}
374374
});
375375

0 commit comments

Comments
 (0)