From cd887a2c32717f2917f49e4eae8a1ea743292f68 Mon Sep 17 00:00:00 2001 From: SodaWithoutSparkles <64138578+SodaWithoutSparkles@users.noreply.github.com> Date: Thu, 23 Mar 2023 18:48:04 +0800 Subject: [PATCH] add `color-scheme: dark` to fix #2554 Signed-off-by: SodaWithoutSparkles <64138578+SodaWithoutSparkles@users.noreply.github.com> --- style/themes/default-dark.css | 5 +++++ style/themes/default-darker.css | 2 ++ style/themes/high-contrast-dark.css | 5 +++++ style/themes/lcars.css | 2 ++ 4 files changed, 14 insertions(+) diff --git a/style/themes/default-dark.css b/style/themes/default-dark.css index 89598f6bb..e0ab70766 100644 --- a/style/themes/default-dark.css +++ b/style/themes/default-dark.css @@ -12,6 +12,11 @@ --datatable-bgcolor: rgba(64, 76, 88, 0.8); } +/* fix #2554: browser not detecting dark mode */ +html { + color-scheme: dark; +} + body { background-color: #353c42; color: #bec5cb; diff --git a/style/themes/default-darker.css b/style/themes/default-darker.css index 31ea20f05..6f6090a73 100644 --- a/style/themes/default-darker.css +++ b/style/themes/default-darker.css @@ -32,6 +32,8 @@ _______|_______/__/ ____ \__\__|___\__\__|___\__\____ /* User-Agent Style */ html { background-color: #181a1b !important; + /* fix #2554: browser not detecting dark mode */ + color-scheme: dark; } html, body, diff --git a/style/themes/high-contrast-dark.css b/style/themes/high-contrast-dark.css index 7151fb184..f8fb8b8c3 100644 --- a/style/themes/high-contrast-dark.css +++ b/style/themes/high-contrast-dark.css @@ -36,6 +36,11 @@ transition: none !important; } +/* fix #2554: browser not detecting dark mode */ +html { + color-scheme: dark; +} + body { font-size: 15px; color: var(--main-text-color); diff --git a/style/themes/lcars.css b/style/themes/lcars.css index ebbcfad76..7907a23ed 100644 --- a/style/themes/lcars.css +++ b/style/themes/lcars.css @@ -24,6 +24,8 @@ /*** General ***/ html { font-size: 17px; + /* fix #2554: browser not detecting dark mode */ + color-scheme: dark; } body {