Support a system-wide dark preference
Dark modes are increasingly ubiquitous, and are popular amongst users. I think that it's important for GTK and GNOME to support them, in order to have feature-parity with other platforms, to be consistent with what is increasingly viewed as a standard cross-platform feature, and to meet user needs and expectations.
Cassidy James from elementary has done a fair bit of work on this, which is useful and is worth a read. What I'm going to suggest here is largely based on his proposal, but I'm leaving out the technical elements - based on IRC discussions it sounds like members of the GTK team might have their own ideas about those.
So, here's an initial proposal for how a dark preference could work for GTK. It's intended as a starting point and I'm happy to update or rewrite it.
Compatibility
The dark mode would need to work in GTK3, so that existing applications can take advantage of it.
The dark mode would also need to not conflict with certain existing GTK themes, particularly Ubuntu's.
Theme styles
Each theme can incorporate one or two styles:
- The first style is what's used by default.
- The second style is an alternative dark style. This is optional. The expectation is that it would be identical to the default style, except that it would have different colours.
Behaviour
If the theme has a dark style, a system setting would enable users to select whether it should be preferred.
Applications could either:
- Use the default style (this is the default behaviour)
- Use a dark style, if it is available (like what GNOME currently does for some media-focused applications)
- Use a dark style, if it is available and preferred
In the case of GNOME, we'd push to have all core GNOME applications use behaviour 2 or 3. Other GTK apps would then be encouraged to do the same.
Potential issues
One potential issue is that there is no way for applications to prefer to use a light style. To do this, there would need to be a way to specify each style as either being light or dark.