diff --git a/src/webview/newMicroPythonProjectPanel.mts b/src/webview/newMicroPythonProjectPanel.mts index c050fe5b..b3f9d7a2 100644 --- a/src/webview/newMicroPythonProjectPanel.mts +++ b/src/webview/newMicroPythonProjectPanel.mts @@ -471,6 +471,12 @@ print("Finished.")\r\n`; // Restrict the webview to only load specific scripts const nonce = getNonce(); + const defaultTheme = + window.activeColorTheme.kind === ColorThemeKind.Dark || + window.activeColorTheme.kind === ColorThemeKind.HighContrast + ? "dark" + : "light"; + return ` @@ -492,9 +498,12 @@ print("Finished.")\r\n`; tailwind.config = { darkMode: 'class', }; + + localStorage.theme = "${defaultTheme}"; + - +