Skip to content

Color the browser title bar to match the theme - #276

Merged
Bensge merged 2 commits into
masterfrom
feature/browser-theme-color
Oct 2, 2026
Merged

Bensge merged 2 commits into
masterfrom
feature/browser-theme-color

Conversation

@Bensge

@Bensge Bensge commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

What

Safari (and Chrome on Android) tint their title/tool bar from <meta name="theme-color">. The page had none, so the bar stayed bright in dark mode. theme.js now creates the tag and sets it to the navbar background of the effective theme: #ffffff for light, #1e293b for dark. It is set on every page load, including System following the OS setting.

Known limitation

In Safari the bar only changes when a page loads. Switching the theme from the popover on an already open page leaves the bar in the old color until the next reload. I tried replacing the tag on each change and setting it again after the reveal transition finished; neither made Safari update, so both were dropped.

Testing

  • Confirmed with the app running locally in Chrome: the tag exists exactly once and has the right value for light, dark and System, and a page reload with dark stored starts with the dark value.
  • Confirmed in Safari (macOS, compact tab layout): the title bar is dark in dark mode and light in light mode after a load.
  • No automated tests added (browser-only behaviour).

🤖 Generated with Claude Code

Bensge and others added 2 commits October 2, 2026 15:39
Safari (and Chrome on Android) tint the title/tool bar from
<meta name="theme-color">. theme.js now creates that tag and sets it to the
navbar background of the effective theme (white for light, #1e293b for dark),
so the bar no longer stays bright in dark mode.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Safari only updates its title bar on load, not when the theme is switched on an
open page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Kotlin Test Results

139 tests  ±0   139 ✅ ±0   38s ⏱️ +4s
 29 suites ±0     0 💤 ±0 
 29 files   ±0     0 ❌ ±0 

Results for commit 3079f49. ± Comparison against base commit fa4af81.

@Bensge
Bensge merged commit 1b45958 into master Oct 2, 2026
8 checks 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.

1 participant