Skip to content

Commit 8fcadcf

Browse files
author
Emil Andersson
committed
use the correct monaco theme when OS theme is light and browser theme is auto
1 parent 6e34919 commit 8fcadcf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/browser/modules/Editor/Monaco.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ const Monaco = ({
7272
editor.defineTheme(DARK_THEME, monacoDarkTheme)
7373
editor.defineTheme(LIGHT_THEME, monacoLightTheme)
7474
editor.defineTheme(OUTLINE_THEME, monacoLightTheme)
75+
// Browser's light theme is called 'normal', but OS's light theme is called 'light'
76+
// 'light' is used when theme is set to light in OS and auto in browser
77+
editor.defineTheme('light', monacoLightTheme)
7578

7679
editorRef.current = editor.create(
7780
document.getElementById(monacoId) as HTMLElement,

0 commit comments

Comments
 (0)