From 483eabf864414b46d9fe85bde47a75c6ae2c8ba6 Mon Sep 17 00:00:00 2001 From: Patrick Cheung Date: Fri, 25 Sep 2026 16:27:24 +0800 Subject: [PATCH] fix(theme): make history ref badges readable in high-contrast light themes (#80) --- .../src/__tests__/ref-badge-contrast.test.ts | 41 +++++++++++++++++++ .../components/commit/CommitDetails.svelte | 8 +++- .../src/components/graph/CommitGraph.svelte | 8 +++- 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 webview-ui/src/__tests__/ref-badge-contrast.test.ts diff --git a/webview-ui/src/__tests__/ref-badge-contrast.test.ts b/webview-ui/src/__tests__/ref-badge-contrast.test.ts new file mode 100644 index 00000000..4b93d5e0 --- /dev/null +++ b/webview-ui/src/__tests__/ref-badge-contrast.test.ts @@ -0,0 +1,41 @@ +// Issue #80: a high-contrast light theme puts both `vscode-light` and +// `vscode-high-contrast` on . The high-contrast `.ref-badge` rule comes +// last, so it wins the text color while the light rules above supply the pale +// fills — a hardcoded white made tags/branches/stashes unreadable. The rule +// must use a theme color that is white in HC dark and dark in HC light. +// +// happy-dom does not apply component