Bug 261149 - Navigating away from a meta color-scheme dark page causes dark background color on target page
Summary: Navigating away from a meta color-scheme dark page causes dark background col...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL: https://markusdosch.github.io/webkit-...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 05:40 PDT by Markus Dosch
Modified: 2023-09-05 13:33 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Dosch 2023-09-05 05:40:51 PDT
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.
Comment 1 Aditya Keerthi 2023-09-05 13:06:05 PDT
Does this reproduce for you in STP? I'm unable to reproduce with Safari 17 (beta).
Comment 2 Aditya Keerthi 2023-09-05 13:06:44 PDT
STP (Safari Technology Preview): https://developer.apple.com/safari/technology-preview/
Comment 3 Markus Dosch 2023-09-05 13:31:24 PDT
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?) :)
Comment 4 Aditya Keerthi 2023-09-05 13:33:54 PDT
It should be! Though the change that would have fixed this does not obviously come to mind 😅