Repository navigation
Readable dropdown options in dark mode - #20
Merged
Merged
Conversation
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
Deploying image-optimizer with
|
| 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 |
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.
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