-
-
Notifications
You must be signed in to change notification settings - Fork 136
Dark Style Preference
This is a proposal for inclusion at FreeDesktop.org. An implementation is currently in progress for elementary OS and the Pantheon desktop environment. This document describes a method for desktop environments, toolkits, and apps to implement and react to a user preference for a dark style.
Inspired by the draft CSS web specification and Cassidy’s The Need for a FreeDesktop Dark Style Preference talk.
- Cassidy James Blaede [email protected]
Users may prefer their desktop and apps to use a dark style where supported. Rather than force this on all apps at the toolkit level, desktops should note a user preference for dark styles, apps should read this preference choose how to adapt their UI in response, and toolkits should make this easier for apps to do.
Sep 13, 2019
This version of the proposal focuses on standardizing the behavior of different components rather than the exact implementation. Feedback and discussion on the implementation is welcome.
Desktops may offer a preference for a dark style to users in their standard desktop settings/preferences UI. Note that it is not explicitly a choice between "light" or "dark", as media or content-centric apps may still render dark when a dark preference is not explicitly set.
Consequently, desktops should present this to users as a "Prefer dark style" toggle (or similar) with appropriate copy detailing what it might affect.
For system-level "shell" UI, the system can choose what to do in response to this preference. If the default shell UI is dark, no change is needed. However, if the default shell UI is light, the shell should respond to this preference by changing to a dark UI. Other components of the system like wallpapers may respond to this preference if there is a dark variant provided.
The toolkit may read this user preference and expose it to apps built with the toolkit via a property, i.e. a user-prefers-dark-style flag. Toolkits should not automatically render the UI in a dark style in response to this user preference, as apps must be able to choose what to do in response.
Apps should bind to this preference (either manually or via toolkit helpers), appropriately updating their styling in response to changes. If an app provides an in-app toggle that includes a dark style, the app should also provide a "follow system preference" setting that is enabled by default.
The user has not expressed a specific preference for UI styling. As such, the app should use its normal styling, whether that is light or dark. For example, document-centric apps should remain light, and media-centric apps should remain dark.
The user has explicitly expressed that they prefer dark styled user interfaces. Consequently, the app should render itself in a dark style, whether via manual styling or by requesting the toolkit's dark variant. Care should be taken so that the app UI is still contrast-compliant, for example by using desaturated accent colors to increase contrast and legibility.
If the app is already dark or using otherwise custom styling where a dark style does not make sense, it can safely ignore this preference.
See the wiki sidebar (below on mobile) for other sections, sub-pages, etc.