Bug 261149
| Summary: | Navigating away from a meta color-scheme dark page causes dark background color on target page | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Markus Dosch <mail> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | akeerthi, simon.fraser, timothy |
| Priority: | P2 | ||
| Version: | Safari 16 | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
| URL: | https://markusdosch.github.io/webkit-bug-meta-color-scheme-dark/ | ||
Markus Dosch
Scenario:
- Originating page A sets <meta name="color-scheme" content="dark" />
- Target page B does not set a color-scheme, and does not set a background-color
When navigating from A to B via a link, the expectation is: The background on B should be white.
Actual result: Target page has a dark background, making the text illegible.
The issue also occurs if the target page explicitly sets color-scheme to light. The issue did only occur when both pages were on the same domain, I could not reproduce it for cross-domain linking.
Demo: https://markusdosch.github.io/webkit-bug-meta-color-scheme-dark/
Chrome & Firefox behave as expected and always show the target page with a white background.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Aditya Keerthi
Does this reproduce for you in STP? I'm unable to reproduce with Safari 17 (beta).
Aditya Keerthi
STP (Safari Technology Preview): https://developer.apple.com/safari/technology-preview/
Markus Dosch
Thanks for your fast response! I just installed & checked with Safari Technology Preview - indeed, I can't reproduce it there!
So it seems it will be fixed in Safari 17 (right?) :)
Aditya Keerthi
It should be! Though the change that would have fixed this does not obviously come to mind 😅