Skip to content

fix(gui): keep inline code readable in high-contrast themes - #13432

Open
aminesayagh wants to merge 1 commit into
continuedev:mainfrom
aminesayagh:13424-inline-code-high-contrast
Open

aminesayagh wants to merge 1 commit into
continuedev:mainfrom
aminesayagh:13424-inline-code-high-contrast

Conversation

@aminesayagh

@aminesayagh aminesayagh commented Oct 26, 2026 •

Copy link
Copy Markdown

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-foreground and --vscode-textPreformat-background as a pair, but StyledMarkdownPreview only 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 in GetTheme.kt. Happy to change it if you prefer that.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screen recording or screenshot

Light High Contrast, before:

Screenshot 2026-10-26 190106

After:

Screenshot 2026-10-26 224134

Tests

CSS-only change, tested manually in VS Code with Light High Contrast.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@aminesayagh
aminesayagh force-pushed the 13424-inline-code-high-contrast branch from 094c2ea to 7aac515 Compare October 26, 2026 22:50
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
aminesayagh force-pushed the 13424-inline-code-high-contrast branch from 7aac515 to 8823c06 Compare October 26, 2026 22:57
@aminesayagh

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@aminesayagh
aminesayagh marked this pull request as ready for review October 26, 2026 23:05
@aminesayagh
aminesayagh requested a review from a team as a code owner October 26, 2026 23:05
@aminesayagh
aminesayagh requested review from sestinj and removed request for a team October 26, 2026 23:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline code becomes unreadable in VS Code high-contrast themes

1 participant