From cc4371640cba6ea49863cf7ce49321679d2c4646 Mon Sep 17 00:00:00 2001 From: BlaCk_Void Date: Sun, 31 Oct 2021 23:50:36 +0900 Subject: [PATCH] Fix: Darkmode at Stable to Dev at `dev` branch #250 --- userChrome.css | 12 ++++++------ userContent.css | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/userChrome.css b/userChrome.css index 8ecb1039..9cdff468 100644 --- a/userChrome.css +++ b/userChrome.css @@ -254,7 +254,7 @@ --win-accent-hover-color: color-mix(in srgb, rgba(255, 255, 255, 0.8) 27%, -moz-accent-color); --win-accent-active-color: -moz-accent-color; } - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { :root:not(:-moz-lwtheme), :root[lwt-default-theme-in-dark-mode] { --win-text-color: #ffffff; @@ -433,7 +433,7 @@ --sidebar-text-color: var(--win-text-color) !important; --sidebar-border-color: var(--win-sidebar-border-color) !important; } - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { .sidebar-panel[style="--newtab-background-color: rgba(43, 42, 51, 1); --newtab-text-primary-color: rgba(251, 251, 254, 1); --lwt-sidebar-background-color: rgb(56, 56, 61); --lwt-sidebar-text-color: rgba(249, 249, 250, 1);"], body[lwt-sidebar][style="--newtab-background-color: rgba(43, 42, 51, 1); --newtab-text-primary-color: rgba(251, 251, 254, 1); --lwt-sidebar-background-color: rgb(56, 56, 61); --lwt-sidebar-text-color: rgba(249, 249, 250, 1);"], .sidebar-panel[style="--newtab-background-color: rgb(43, 42, 51); --newtab-text-primary-color: rgba(251, 251, 254, 1); --lwt-sidebar-background-color: rgb(56, 56, 61); --lwt-sidebar-text-color: rgba(249, 249, 250, 1);"], /* Nightly */ @@ -457,7 +457,7 @@ :root[lwtheme-mozlightdark]:not([lwthemetextcolor="bright"]):not(:-moz-lwtheme) { --lwt-accent-color: var(--win-bgcolor) !important; } - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { :root[lwt-default-theme-in-dark-mode][lwthemetextcolor="bright"] { --toolbar-bgcolor: var(--win-component-bgcolor) !important; /* Original: rgba(43, 42, 51, 1) */ } @@ -663,7 +663,7 @@ --panelview-toolbarbutton-focus-box-shadow: inset 0 0 0 2px var(--focus-outline-color) !important; } - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { :root:not(:-moz-lwtheme), :root[lwt-default-theme-in-dark-mode] { --mac-field-bgcolor: Field; @@ -707,7 +707,7 @@ --sidebar-text-color: var(--mac-text-color) !important; /* --sidebar-border-color: var(--win-sidebar-border-color) !important; */ } - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { .sidebar-panel[style="--newtab-background-color: rgba(43, 42, 51, 1); --newtab-text-primary-color: rgba(251, 251, 254, 1); --lwt-sidebar-background-color: rgb(56, 56, 61); --lwt-sidebar-text-color: rgba(249, 249, 250, 1);"], body[lwt-sidebar][style="--newtab-background-color: rgba(43, 42, 51, 1); --newtab-text-primary-color: rgba(251, 251, 254, 1); --lwt-sidebar-background-color: rgb(56, 56, 61); --lwt-sidebar-text-color: rgba(249, 249, 250, 1);"], .sidebar-panel[style="--newtab-background-color: rgb(43, 42, 51); --newtab-text-primary-color: rgba(251, 251, 254, 1); --lwt-sidebar-background-color: rgb(56, 56, 61); --lwt-sidebar-text-color: rgba(249, 249, 250, 1);"], /* Nightly */ @@ -725,7 +725,7 @@ /*- Others ---------------------------------------------------------------*/ /* For Overwrite */ - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { :root[lwt-default-theme-in-dark-mode][lwthemetextcolor="bright"] { --toolbar-bgcolor: color-mix(in srgb, rgb(255, 255, 255) 15%, -moz-dialog) !important; } diff --git a/userContent.css b/userContent.css index 971477fe..325bbaf0 100644 --- a/userContent.css +++ b/userContent.css @@ -1145,7 +1145,7 @@ --view-source-green: var(--green-80); --view-source-purple: #800080; /* Like alphenglow */ } - @media (prefers-color-scheme: dark) { + @media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) { :root { --view-source-green: var(--green-60); --view-source-purple: #c68aff;