Repository navigation
Add color scheme configuration and follow VS Code's theme by default - #87
Merged
Merged
Conversation
axelboc
force-pushed
the
color-scheme
branch
from
September 21, 2026 11:08
e7ab545 to
aaeb29a
Compare
loichuder
approved these changes
Sep 28, 2026
loichuder
left a comment
Member
There was a problem hiding this comment.
Great stuff!
Could we add somewhere a warning telling that the theme change will be applied only after reloading?
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.
Fix #78
Add configuration option
h5web.colorSchemewith four possible values:"vscode": follow VS Code's theme — the new default behaviour"system": follow the operating system's color scheme — the old behaviour"light": force the light color scheme"dark": force the dark color schemeImplementation-wise, the idea is to set this configuration value in a
data-color-schemeattribute on the body of the webview, next to VS Code's owndata-vscode-theme-kindattribute.system, we let H5Web apply the OS' schemedisableDarkModeprop) and apply the dark scheme ourselves with CSS:data-color-scheme="dark", ordata-color-scheme="vscode"anddata-vscode-theme-kind="vscode-dark"For simplicity, changes to the
h5web.colorSchemeoption are only applied after reloading the editor.Screencast.from.2026-09-21.11-02-03.webm