fix(theme): make native select popups follow dark theme on Linux#141
Merged
Conversation
On Linux webkit2gtk, the open <select> popup is painted by GTK using the system theme — light on most distros — even when our app chrome is dark. The W3C-standard color-scheme property is the right hint: it tells the webview which variant of native controls (select popups, scrollbars, date pickers) to render. color-scheme: dark on :root by default; color-scheme: light flips together with the existing .light class on <html>. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 21, 2026
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.
Summary
color-scheme: darkto:root(andcolor-scheme: lightto:root.light) inassets/css/main.css<select>popup rendering as a light GTK panel on Linux even when our app chrome is darkWhy
On Linux, Tauri renders via webkit2gtk. The closed
<select>control is styled by our CSS (bg-autonomi-dark, etc.) but the open popup is painted by GTK, which uses the system theme — and most distros default to a light theme. Our CSS can't reach into the GTK popup; we need to tell the webview which variant of native controls to render.color-schemeis the W3C-standard property for exactly this:Side effects (all positive):
Why now
The language picker is the entry point for any future CJK font-banner testing on Linux — testers need to switch to
jato see the banner. A jarring light-on-dark dropdown popup right at that entry point reads as broken even though the rest of the UI is fine.Test plan
npm run buildclean🤖 Generated with Claude Code