Re: System-wide dark mode



On Thu, May 30, 2019 at 4:15 AM, Allan Day <aday gnome org> wrote:
How does this relate to the dark mode in WebKit?

I was hoping that Web would follow the system-wide dark mode preference, and expose it to websites...

The ideal, desired behavior is to enable dark mode on any websites that opt-in to dark mode, if and only if the user has selected the dark mode preference. We can't implement that without design changes in GTK since for that we need the ability to *very quickly* switch between different themes in the same process, and that's currently too slow.

The current behavior, in our current world where there is no dark mode preference, is that if you select a dark theme, a ton of websites break, because most websites are not prepared for dark mode and will draw e.g. dark text on dark backgrounds. So if we make dark mode an officially-supported option, the very least we need to do is force light mode on all websites, even if dark mode is enabled, to avoid this breakage. That's already sort of possible to do using heuristics, e.g. removing "dark" from the end of the theme name and hoping it makes a valid theme, but that's hardly a good solution. A more official control would be better. Notably, it *will not* be possible to do if dark mode is controlled by a gsetting, since we can't change the value of a gsetting for just a single process.

Michael




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]