fix: command palette shows dark background in light mode#1
Open
oliviergoulet5 wants to merge 1 commit into
Open
fix: command palette shows dark background in light mode#1oliviergoulet5 wants to merge 1 commit into
oliviergoulet5 wants to merge 1 commit into
Conversation
Dark colors are shown in the background and borders of the command palette in light mode. This is due to the fact that :host-context is being used. This is a deprecated browser feature.
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.
Hello, I was curious and wanted to check out this project!
I noticed that the command palette continues to use dark theme colors when the application is in light mode. After investigating, it appears this is caused by the use of
:host-context()in the theme selectors, which is a deprecated browser feature.I was able to produce the issue in Firefox 151.0.4. Chrome does not appear to be affected at the moment.
This change removes
:host-context()CSS rules and updates the command palette styling so it correctly adapts to the active theme. I used Web Awesome's semantic CSS variables (surface, neutral-filled, etc.) rather than the exactneutralvariables that were previously in use, as it seemed to me like the simplest way to adapt to the active theme.This may result in some minor visual differences compared to the current implementation. If preserving the existing appearance is preferred, I'm happy to revisit the styling and adjust the variable selection.
Screenshot: