Skip to content

fix: command palette shows dark background in light mode#1

Merged
erdalkaraca merged 2 commits into
eclipse-docks:mainfrom
oliviergoulet5:fix/command-palette-light-mode-broken
Jul 16, 2026
Merged

fix: command palette shows dark background in light mode#1
erdalkaraca merged 2 commits into
eclipse-docks:mainfrom
oliviergoulet5:fix/command-palette-light-mode-broken

Conversation

@oliviergoulet5

@oliviergoulet5 oliviergoulet5 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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 exact neutral variables 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:

Screenshot From 2026-06-16 20-11-42

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.
@oliviergoulet5

Copy link
Copy Markdown
Contributor Author

Hey @erdalkaraca, not sure if you noticed this PR. Just wanted to check if you had a chance to take a look.

@erdalkaraca

Copy link
Copy Markdown
Contributor

@oliviergoulet5 Thanks a lot for your interest and contribution! Sorry, I was not aware of the PR and will review ASAP.

Remove remaining :host-context rules so light mode works in Firefox.

Co-authored-by: Cursor <cursoragent@cursor.com>
@erdalkaraca

Copy link
Copy Markdown
Contributor

@oliviergoulet5 Thanks a lot for your contribution! I could reproduce the theming issue on firefox (so far I only tested on chrome based browsers). I also found 2 more deprecated host-context selectors and adopted to your approach of using semantic color tokens.

@erdalkaraca
erdalkaraca merged commit 9fefd8d into eclipse-docks:main Jul 16, 2026
1 check passed
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.

2 participants