Skip to content

fix(theme): make the header readable on the dark backdrop - #60

Merged
skjnldsv merged 2 commits into
mainfrom
chore/refresh-screenshot
Sep 22, 2026
Merged

skjnldsv merged 2 commits into
mainfrom
chore/refresh-screenshot

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Started as a screenshot refresh and turned into a bug fix.

The viewer is dark whatever theme the server runs. Only the backdrop was. The header kept the light theme's --color-main-text, so the filename and the actions rendered at #222 on black:

fg rgb(34,34,34)  bg rgb(0,0,0)  contrast 1.32

WCAG asks 4.5 of normal text. It reads at all in the old screenshot only where the photograph lights it from behind. The dark palette is now scoped to the modal, unless a handler asked for a light backdrop, which takes it to 21.

The theme test is how this lasted: it asserted the backdrop had gone dark and said nothing about what sits on it. It now checks the contrast too, and I reverted the fix to confirm it fails, at exactly 1.32.

The screenshot

Retaken against the fixed header, so it shows the rotate button that arrived in beta.11 rather than the September layout.

The playground's own file list has grown long enough with all the format fixtures that it now shows beneath the modal, so it is hidden for the portrait. That is the harness, not the product.

The picture sitting high

Worth recording what it was, because it was not what it looked like. There was no overlap and no opacity:

header     0 → 44      (--header-height: 44px)
container  44 → 756
img        44 → 756    viewport 800

Equal bands above and below, so it was centred. It read high because the top band was filled by the header while the matching bottom band was empty, and the picture began exactly where the bar ended.

There are now eight pixels under the header, and the band below is left as it was, so the top one carries the header and the gap:

header     0 → 44
img        52 → 756

390 unit, 88 e2e.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

Refreshing the readme screenshot is what turned this up. The viewer is
dark whatever theme the server runs, and only the backdrop was: the
header kept the light theme's --color-main-text, so the filename and the
actions rendered at #222 on black. 1.32 against the 4.5 that normal text
is meant to clear. Legible in the screenshot only where the photograph
lit it from behind.

The dark palette is now scoped to the modal, unless a handler asked for a
light backdrop, which takes it to 21.

The theme test asserted the backdrop had gone dark and nothing about what
sits on it, which is how this lasted. It now checks the contrast, and
fails at 1.32 with the fix taken out.

The screenshot is retaken against the fixed header, and shows the rotate
button that arrived in beta.11. The playground's own file list had grown
long enough to show under the modal, so it is hidden for the portrait.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added status: review Waiting for reviews type: bug 🐛 Something isn't working AI assisted labels Sep 22, 2026
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.80%. Comparing base (0dd399b) to head (33a5460).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   88.80%   88.80%           
=======================================
  Files          39       39           
  Lines        2743     2743           
  Branches      564      564           
=======================================
  Hits         2436     2436           
  Misses        300      300           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The picture started where the header ended, which read as pushed up
against the top of the window even though the bands above and below were
equal. Eight pixels under the bar, and the band below left alone, so the
one above now carries the header and the gap.

Screenshot retaken.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv
skjnldsv merged commit 1fc3b82 into main Sep 22, 2026
18 checks passed
@skjnldsv
skjnldsv deleted the chore/refresh-screenshot branch September 22, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted status: review Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant