Skip to content

Commit

Permalink
Describe about color scheme policy
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Mar 6, 2020
1 parent aaf0f47 commit 31178db
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions webextensions/resources/ui-color.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,23 @@ hr {
}

@media (prefers-color-scheme: dark) {
/*
We don't apply the dark color scheme, when the system
color mode is active.
* The system color mode of TST is enabled by default
only on Linux. Firefox's default theme on Linux uses
system colors, so we also need to use system colors
on addon. On this environment, CSS media query based
"dark mode" is not supported.
* The system color mode is disabled on Windows and macOS.
Firefox's default theme on these environments are
designed with Photon color scheme, and colors are
switched to dark colors when the dark color mode is
activated on the OS side. So, TST also does same thing
- applies light colors by default, and applies dark
colors on the dark color mode.
*/
:root#sidebar.apply-browser-theme:not([color-scheme="system-color"]),
:root:not(#sidebar):not([color-scheme="system-color"]) {
/* https://hg.mozilla.org/mozilla-central/raw-file/tip/toolkit/themes/shared/in-content/common.inc.css */
Expand Down

0 comments on commit 31178db

Please sign in to comment.