Skip to content

Readable dropdown options in dark mode - #20

Merged
farhanmasud merged 1 commit into
stagingfrom
fix/dark-select-options
Nov 7, 2026
Merged

farhanmasud merged 1 commit into
stagingfrom
fix/dark-select-options

Conversation

@farhanmasud

Copy link
Copy Markdown
Member

Fixes the white-on-white dropdown lists you saw.

Cause: an open dropdown takes its colours from its options. Chrome on Windows and Linux draws the list of a transparent select in white, and in dark mode the options inherit the select's light text.

Fix: options now use the page's colours, white with dark text or near-black with light text (src/app.css). This covers the Role, Quality and Max width dropdowns, the Role dropdown on each row, and Markup.

Test: in light and dark mode, every option's text must reach 4.5:1 against its background. Where an option has no background of its own, the test measures against white, as Chrome draws it. Without the fix, dark mode fails at 2.6:1.

The open list is drawn by the browser, outside the page, so tests can't screenshot it. To check by eye in Chrome with dark mode on: open the preview, add an image, and open a dropdown.

🤖 Generated with Claude Code

https://claude.ai/code/session_01STHRjFYWhkJBxSKG3tJdap

An open select list takes its colours from the options. Chrome on Windows and Linux
draws a transparent select's list in white, while the options inherit the select's
light text in dark mode: white on white. The options now get the page's colours in
both modes.

The new test checks every option's text against its background (white where the
option is transparent), in light and dark mode. Without the fix, dark mode fails at
2.6:1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01STHRjFYWhkJBxSKG3tJdap
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying image-optimizer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2b8265a
Status: ✅  Deploy successful!
Preview URL: https://60cf16f1.image-optimizer-7ba.pages.dev
Branch Preview URL: https://fix-dark-select-options.image-optimizer-7ba.pages.dev

View logs

@farhanmasud
farhanmasud merged commit 278d62f into staging Nov 7, 2026
2 checks passed
@farhanmasud
farhanmasud deleted the fix/dark-select-options branch November 7, 2026 14:37
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