Repository navigation
fix(gui): keep inline code readable in high-contrast themes - #13432
Open
aminesayagh wants to merge 1 commit into
Open
aminesayagh wants to merge 1 commit into
aminesayagh wants to merge 1 commit into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
aminesayagh
force-pushed
the
13424-inline-code-high-contrast
branch
from
October 26, 2026 22:50
094c2ea to
7aac515
Compare
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 continuedev#13424
aminesayagh
force-pushed
the
13424-inline-code-high-contrast
branch
from
October 26, 2026 22:57
7aac515 to
8823c06
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #13424.
Inline code in chat responses can't be read in the high-contrast themes. VS Code's webview styles
<code>with--vscode-textPreformat-foregroundand--vscode-textPreformat-backgroundas a pair, butStyledMarkdownPreviewonly overrides the background (with the editor background). In Light High Contrast that gives white text on a white background, and on some older VS Code versions Dark High Contrast ends up black on black.This change sets both colors from the textPreformat pair for inline code. When those variables aren't defined (e.g. JetBrains), it falls back to the current colors, so nothing changes there. Symbol links keep their link color, and code blocks aren't affected.
In regular themes inline code now gets the light textPreformat background, the same as in VS Code's own markdown preview.
I used the VS Code variables directly instead of adding them to
theme.ts, since that would also need a JetBrains mapping inGetTheme.kt. Happy to change it if you prefer that.Checklist
Screen recording or screenshot
Light High Contrast, before:
After:
Tests
CSS-only change, tested manually in VS Code with Light High Contrast.