summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-11-07 11:04:52 +0100
committerJo-Philipp Wich <jo@mein.io>2021-11-07 11:06:33 +0100
commited86f03a9f7c2f58a9111f925bb81303596b394b (patch)
treef4f3f9f08c36bb9ce1ec8e50ca371dbf58dcd20a /themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap
parentcd6ad0a242a580fe006e7813c1904fe334299f9a (diff)
luci-theme-bootstrap: add explicit dark/light mode selection
Register two further "virtual" themes called BootstrapDark and BootstrapLight which force dark and light mode respectively. The actual Bootstrap theme itself will continue to auto-select dark mode preference based on OS/Browser preference settings. Fixes: #5492 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap')
-rw-r--r--themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css22
1 files changed, 10 insertions, 12 deletions
diff --git a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
index 4063a39fac..615ce80ea9 100644
--- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
+++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
@@ -70,18 +70,16 @@
color-scheme: light dark;
}
-@media (prefers-color-scheme: dark) {
- :root {
- --background-color-delta-l-sign: 1;
- --background-color-high-h: 0;
- --background-color-high-s: 0%;
- --background-color-high-l: calc(34 / 255 * 100%);
- --text-color-delta-l-sign: -1;
- --text-color-highest-h: 0;
- --text-color-highest-s: 0%;
- --text-color-highest-l: 100%;
- --border-color-delta-l-sign: 1;
- }
+:root[data-darkmode="true"] {
+ --background-color-delta-l-sign: 1;
+ --background-color-high-h: 0;
+ --background-color-high-s: 0%;
+ --background-color-high-l: calc(34 / 255 * 100%);
+ --text-color-delta-l-sign: -1;
+ --text-color-highest-h: 0;
+ --text-color-highest-s: 0%;
+ --text-color-highest-l: 100%;
+ --border-color-delta-l-sign: 1;
}
/* Reset.less