[Webkit-unassigned] [Bug 196685] [GTK] Support prefers-color-scheme media query

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 15 17:50:52 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=196685

Cassidy James Blaede <cassidy at elementary.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cassidy at elementary.io

--- Comment #11 from Cassidy James Blaede <cassidy at elementary.io> ---
I still think this is correct from how you've explained it to me, Michael. 

The fact is, theme variants exist in GTK to handle dark themes, and if a theme is always-dark, it's a broken theme imho. What needs to exist in GNOME or GTK is a system-wide preference of "the user would like apps to use a dark style *if the app supports it*," like we now see in Android Q, macOS, Windows, and soon in iOS. This is separate and distinct from "the user is using a custom theme which happens to use a dark background for everything," and I don't think that case should be supported—again, because that's what the dark theme variant is for.

Instead, browsers like Epiphany could look at that system-wide dark preference and in response, set their own `gtk-application-prefer-dark-theme` based on the system-wide preference. Then, if `gtk-application-prefer-dark-theme` is true, WebKit should use the dark variant and sites that hook off that media query should also use their dark styles. That last part is what I understand this patch does—if not, I'm sorry that I've misunderstood!

I guess the one edge case that I'm not sure of is what happens when the browser has `gtk-application-prefer-dark-theme` as true, but the site does not claim to support a dark style. In *that* case, WebKit should continue to use light/default form styles to prevent color conflicts. I believe this is also how macOS Safari handles it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190516/97dfe212/attachment-0001.html>


More information about the webkit-unassigned mailing list