aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Martin <secure@alm.website>2022-12-20 15:45:20 -0500
committerAlex Martin <secure@alm.website>2022-12-20 15:45:20 -0500
commit986cd7c0bdb53e2ef5b5f0010a46e9a48c72a880 (patch)
tree5c9769d47e2bc0d83350598cd82d2cc6efbb55b2
parenteda40355d731036e989ded5a3694457bfd946516 (diff)
Support dark color modes
-rw-r--r--resources/published/static/css/custom.css9
-rw-r--r--resources/published/static/css/navbar.css6
2 files changed, 14 insertions, 1 deletions
diff --git a/resources/published/static/css/custom.css b/resources/published/static/css/custom.css
index 7c4f521..bc279b8 100644
--- a/resources/published/static/css/custom.css
+++ b/resources/published/static/css/custom.css
@@ -1,4 +1,5 @@
-body {
+:root {
+ color-scheme: light dark;
font-family: sans-serif;
}
@@ -14,6 +15,12 @@ pre {
border-radius: 3px;
}
+@media (prefers-color-scheme: dark) {
+ code, pre {
+ background-color: #333;
+ }
+}
+
.align-left {
float: left;
}
diff --git a/resources/published/static/css/navbar.css b/resources/published/static/css/navbar.css
index 17d217e..9b4511b 100644
--- a/resources/published/static/css/navbar.css
+++ b/resources/published/static/css/navbar.css
@@ -11,6 +11,12 @@ nav li {
margin: 2px;
}
+@media (prefers-color-scheme: dark) {
+ nav ul, nav li {
+ border-color: CanvasText;
+ }
+}
+
nav h1 {
margin-top: 0;
margin-bottom: 0;