Bug 208204 - [GTK] Support color-schemes CSS property?
Summary: [GTK] Support color-schemes CSS property?
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 09:12 PST by Michael Catanzaro
Modified: 2020-03-11 11:18 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2020-02-25 09:12:26 PST
Now that GTK port no longer uses foreign drawing to render widgets, since r257299, it's finally possible to support the color-schemes CSS property. (See bug #197947 for discussion of why this was not previously possible.)

Overview of how dark mode works currently:

Firefox and Chrome and WebKitGTK since r255342: indicate to the webpage whether user prefers a dark theme using prefers-color-scheme, but always render controls using light theme. (GOOD)

Safari only: indicates to the webpage whether user prefers a dark theme using prefers-color-scheme, renders light controls usually EXCEPT if website opts-in to dark form controls using color-schemes CSS property. (BEST)

Downsides: this would complicate the new built-in Adwaita theme, so we might not want to do it.
Comment 1 Carlos Garcia Campos 2020-02-26 00:59:13 PST
Well, I think we can try, but I want to give some more time to the new theme code, get feedback and improve it a bit before adding a new feature like this. We have the whole release cycle :-)