From cff0010a76bb4d72b2162b4834376a63705e359f Mon Sep 17 00:00:00 2001 From: junyu33 Date: Fri, 7 Aug 2026 22:38:44 +0800 Subject: [PATCH] fix(vscode): support high-contrast dark theme --- apps/vscode/webview-ui/src/main.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/vscode/webview-ui/src/main.tsx b/apps/vscode/webview-ui/src/main.tsx index ae4b4ea151..c143d3cb1e 100644 --- a/apps/vscode/webview-ui/src/main.tsx +++ b/apps/vscode/webview-ui/src/main.tsx @@ -3,7 +3,10 @@ import { createRoot } from "react-dom/client"; import App from "./App"; function syncTheme() { - const isDark = document.body.classList.contains("vscode-dark"); + const themeKind = document.body.dataset.vscodeThemeKind; + const isDark = + themeKind === "vscode-dark" || + themeKind === "vscode-high-contrast"; document.documentElement.classList.toggle("dark", isDark); }