microsoft / microsoft/vscode

Webview theme colors disappear after a while; switching theme brings them back temporarily

Open
#336,272 1 comment 0 reactions 1 assignee Claimed by @hawkticehurst View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Type: Bug

Version: VS Code 1.137.0 (commit 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c), x64
OS: Windows 11 Home 10.0.26200
Theme: Light 2026 (also happens with other themes)

After VS Code has been open for a while, parts of webviews lose their theme colors. Some elements end up with a transparent background, or with a text color so close to the background that you can't see them. Switching to any other color theme fixes it right away. After some time it breaks again, and I have to switch themes again.

It isn't specific to one extension. I've seen it in two unrelated webviews:

GitHub Pull Requests (0.166.0), PR description page. The "Checkout" button and its dropdown arrow lose their button styling. There's no background or border, and the label is pale gray, so the button is basically invisible. The "Refresh" button next to it still looks normal. (Screenshot 1)
Claude Code (2.1.272), chat panel. The message input box at the bottom loses its background, so the conversation text above shows through it and overlaps the input controls. (Screenshot 2)
In both cases the page still works. Only the colors are missing.

Steps to reproduce

I don't have exact steps, because it appears after some time rather than after a specific action.

Open a webview that uses theme colors, e.g. a PR page from GitHub Pull Requests.
Keep using VS Code normally.
At some point, some elements lose their colors as described above.
Switch to any other color theme. The colors come back.
After a while it happens again.
Expected: webviews keep their theme colors for as long as the window is open.

Actual: some theme colors seem to drop out of webviews over time, until a theme change refreshes them.

It's the same whichever theme I switch to, so I don't think a particular theme is to blame. My guess is that the theme colors VS Code passes into webviews get lost or reset at some point, and a theme change sends them again. I haven't figured out what sets it off (a webview refresh, a hidden tab becoming visible again, sleep/resume, etc.). I'll add details if I narrow it down.

Other installed extensions: LaTeX Workshop, TexLab, Python/Pylance/Jupyter, Remote-SSH, OpenAI ChatGPT, GitHub Actions, Live Server, vscode-pdf, Rainbow CSV, Makefile Tools, Edit with Shell, Transpose, and a local extension of mine (mathpad). None of them change colors or themes as far as I know.

VS Code version: Code 1.137.0 (645f29cc3176500b4b5762ba887cf2a7f0ffdf2c, 2026-09-08T13:43:59-07:00)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|12th Gen Intel(R) Core(TM) i7-1260P (16 x 2496)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x46a6 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.7085 *ACTIVE*
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.9278
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|31.70GB (13.83GB free)|
|Process Argv|--crash-reporter-id 2289df18-33b7-4855-8aa7-260cbdc563bb|
|Screen Reader|no|
|VM|0%|
Extensions (9)

Name|Identifier|Author|Version
---|---|---|---
Claude Code for VS Code|anthropic.claude-code|Anthropic|2.1.272
GitHub Pull Requests|github.vscode-pull-request-github|GitHub|0.166.0
LaTeX Workshop|james-yu.latex-workshop|James-Yu|10.18.0
Remote - SSH|ms-vscode-remote.remote-ssh|ms-vscode-remote|0.128.0
Remote - SSH: Editing Configuration Files|ms-vscode-remote.remote-ssh-edit|ms-vscode-remote|0.87.0
Live Preview|ms-vscode.live-server|ms-vscode|0.4.20
Remote Explorer|ms-vscode.remote-explorer|ms-vscode|0.5.0
Live Server|ritwickdey.liveserver|ritwickdey|5.7.10
Mathpad|rotem.mathpad|rotem|0.2.0

A/B Experiments

```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
c9b86496:31447327
capico_axe_098a3278:31582664
ei9d7968:31496641
chat:31457767
8hig5102:31480529
ah:31461780
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ec1eg703:31520046
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
d7b18187:31526828
ahp-both-windows:31556933
ihg5j128:31534457
9gg7f176:31542112
nes-ex-cf-euporie-03:31542868
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
nemo-v2:31565334
0c1h4866:31566224
session-mark-done:31558131
5b8j3302:31564601
jb322307:31583825
mangle-name-treatment:31572634
allow-signed-out:31584137
intellij_nes_preview_t:31580086
multiv2:31574985
2bfb8b39:31576696
outline:31581109
aw-autom-on:31583758
revealsession_treatment_7ed7e840:31582194
permission_prompt_control:1332567
ccr_pr_nudge_control:1319470
vsc_wsm_t:1340632
jidc7660:1370295
h5e14506:1348996
1g5a5742:1379227
3aced641:1389836

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.