From 8823c06db1d8d43a66bbdd2053a27017d4f9d7e9 Mon Sep 17 00:00:00 2001 From: aminesayagh Date: Mon, 26 Oct 2026 22:44:18 +0000 Subject: [PATCH] fix(gui): keep inline code readable in high-contrast themes StyledMarkdownPreview only overrode the background of inline code, so VS Code's textPreformat foreground ended up on a background it wasn't meant for (white on white in Light High Contrast). Use the textPreformat foreground/background pair, fall back to the current colors, and leave symbol links unchanged. Fixes #13424 --- gui/src/components/StyledMarkdownPreview/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gui/src/components/StyledMarkdownPreview/index.tsx b/gui/src/components/StyledMarkdownPreview/index.tsx index 2ff217a6147..810087b8ed9 100644 --- a/gui/src/components/StyledMarkdownPreview/index.tsx +++ b/gui/src/components/StyledMarkdownPreview/index.tsx @@ -108,6 +108,15 @@ const StyledMarkdown = styled.div<{ font-family: var(--vscode-editor-font-family); } + /* Symbol links keep their link color */ + code:not(pre > code):not(.text-link) { + color: var(--vscode-textPreformat-foreground, ${vscForeground}); + background-color: var( + --vscode-textPreformat-background, + ${vscEditorBackground} + ); + } + background-color: ${(props) => props.bgColor}; font-family: var(--vscode-font-family),