fix(skin): paint root canvas so iOS dark mode has no white status bar (#7606)#7931
Conversation
… bar (#7606) The OP still saw a white strip above the dark pad on iOS Safari even with the theme-color metas in place. theme-color only tints the address-bar chrome; the status-bar safe area at the very top is painted by iOS from the ROOT canvas background. The colibris background variants only colour inner containers (#editorcontainerbox, body descendants), leaving <html> and <body> transparent (computed rgba(0,0,0,0)) with color-scheme: normal — so the canvas fell back to the UA light default (white). Android tints its chrome from theme-color, which is why it looked fine there but iOS did not. Paint the <html> root per toolbar variant with the toolbar colour (matching theme-color and the OP's request that the bar match the toolbar) and set color-scheme so the safe area, toolbar, and address bar are one seamless colour. Verified in a mobile viewport: dark-OS root background is now rgb(72,83,101) (#485365, == --super-dark-color, the toolbar colour); light-OS stays white. Colours mirror skin_toolbar_colors.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
PR Summary by QodoFix iOS dark-mode status bar by painting the Colibris root canvas WalkthroughsUser DescriptionProblemFollow-up to #7909 (merged). The OP confirmed Android Chrome/Firefox now look correct, but iOS Safari still shows a white strip at the very top in dark mode — the status-bar area above the dark toolbar. Screenshot: dark toolbar + dark pad, but a white band behind the iOS status bar (clock/battery). Root cause
In the colibris skin the background variants only colour inner containers ( Transparent root + FixPaint the html.super-light-toolbar, html.light-toolbar { color-scheme: light; }
html.super-dark-toolbar, html.dark-toolbar { color-scheme: dark; }
html.super-light-toolbar { background-color: var(--super-light-color); }
html.light-toolbar { background-color: var(--light-color); }
html.super-dark-toolbar { background-color: var(--super-dark-color); }
html.dark-toolbar { background-color: var(--dark-color); }Verification (mobile viewport, this branch)
🤖 Generated with Claude Code AI Description• Paint the `` root background per toolbar variant to prevent iOS Safari white safe-area strip. • Set color-scheme on the root to keep UA-painted chrome consistent with the selected variant. • Add a frontend regression test asserting the dark root canvas matches the toolbar color. Diagramgraph TD
A["Skin variant tokens"] --> B["<html> toolbar class"] --> C["pad-variants.css"] --> D["Root bg + color-scheme"] --> E["iOS status-bar safe area"]
B --> F["theme-color meta"] --> G["Address bar tint"]
High-Level AssessmentThe following are alternative approaches to this PR: 1. Paint root via background-variant rules (instead of toolbar variants)
2. Rely on meta tags only (theme-color / apple-mobile-web-app-status-bar-style)
Recommendation: Current approach (painting `` with the toolbar color and setting File ChangesBug fix (1)
Tests (1)
|
Problem
Follow-up to #7909 (merged). The OP confirmed Android Chrome/Firefox now look correct, but iOS Safari still shows a white strip at the very top in dark mode — the status-bar area above the dark toolbar. Screenshot: dark toolbar + dark pad, but a white band behind the iOS status bar (clock/battery).
Root cause
theme-coloronly tints the address-bar chrome. The status-bar safe area at the top is painted by iOS Safari from the page's root canvas background — not fromtheme-color. (Android tints its chrome fromtheme-color, which is why it looked fine there but iOS didn't.)In the colibris skin the background variants only colour inner containers (
#editorcontainerbox,bodydescendants);<html>and<body>stay transparent. Measured in a mobile dark-mode viewport on the merged build:Transparent root +
color-scheme: normal→ the UA canvas falls back to the light default (white) → white status-bar strip.Fix
Paint the
<html>root per toolbar variant with the toolbar colour (matchingtheme-colorand the OP's original request that the bar match the toolbar), and setcolor-schemeso the safe area, toolbar, and address bar are one seamless colour. Colours mirrorskin_toolbar_colors.ts.Verification (mobile viewport, this branch)
background-coloris nowrgb(72, 83, 101)(#485365, == toolbar ==theme-color),color-scheme: dark.rgb(255, 255, 255),color-scheme: light— unchanged.🤖 Generated with Claude Code