Bug 266049
| Summary: | [macOS] Switch control track is invisible on dark background | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Nguyen (:ntim) <ntim> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | annevk, cdumez, lwarlow, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 259380 | ||
Tim Nguyen (:ntim)
data:text/html,<body bgcolor="black"><input type="checkbox" switch>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/119351066>
Anne van Kesteren
It should work fine in dark mode, but that has to be explicitly enabled. I did not see that AppKit accounts for this, although it does allow control over both the track and thumb color individually, whereas the web platform only allows control over the track color.
Luke Warlow
This seems to work fine if you set `color-scheme: dark` on the element. It's unclear why the background color of the switch would change dependent on the page's background colour? Perhaps AppKits switch is context aware somewhat? Is there a way to opt-out of that by default so the switch acts more like other controls (is light mode by default?)