<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>261149</bug_id>
          
          <creation_ts>2023-09-05 05:40:51 -0700</creation_ts>
          <short_desc>Navigating away from a meta color-scheme dark page causes dark background color on target page</short_desc>
          <delta_ts>2023-09-05 13:33:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari 16</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>https://markusdosch.github.io/webkit-bug-meta-color-scheme-dark/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Markus Dosch">mail</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>timothy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1975512</commentid>
    <comment_count>0</comment_count>
    <who name="Markus Dosch">mail</who>
    <bug_when>2023-09-05 05:40:51 -0700</bug_when>
    <thetext>Scenario:

- Originating page A sets &lt;meta name=&quot;color-scheme&quot; content=&quot;dark&quot; /&gt;
- 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 &amp; Firefox behave as expected and always show the target page with a white background.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975637</commentid>
    <comment_count>1</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2023-09-05 13:06:05 -0700</bug_when>
    <thetext>Does this reproduce for you in STP? I&apos;m unable to reproduce with Safari 17 (beta).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975638</commentid>
    <comment_count>2</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2023-09-05 13:06:44 -0700</bug_when>
    <thetext>STP (Safari Technology Preview): https://developer.apple.com/safari/technology-preview/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975647</commentid>
    <comment_count>3</comment_count>
    <who name="Markus Dosch">mail</who>
    <bug_when>2023-09-05 13:31:24 -0700</bug_when>
    <thetext>Thanks for your fast response! I just installed &amp; checked with Safari Technology Preview - indeed, I can&apos;t reproduce it there! 

So it seems it will be fixed in Safari 17 (right?) :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975648</commentid>
    <comment_count>4</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2023-09-05 13:33:54 -0700</bug_when>
    <thetext>It should be! Though the change that would have fixed this does not obviously come to mind 😅</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>