summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2020-10-28 15:25:37 +0100
committerAlan Pearce2020-10-28 15:25:37 +0100
commitc6801bf514b48b5298aaf004f02fd1ec59ce6552 (patch)
treec6f8637c65724efddd33a7cabea0ab065e0ddf0d
parent0d88380b9d4c0731c60739b262fd659bd6c211c8 (diff)
downloadwebsite-hugo.tar.lz
website-hugo.tar.zst
website-hugo.zip
Add basic dark-mode support hugo
-rw-r--r--themes/xmin/static/css/style.css21
1 files changed, 21 insertions, 0 deletions
diff --git a/themes/xmin/static/css/style.css b/themes/xmin/static/css/style.css
index efa871e..e605297 100644
--- a/themes/xmin/static/css/style.css
+++ b/themes/xmin/static/css/style.css
@@ -52,3 +52,24 @@ table thead th { border-bottom: 1px solid #ddd; }
 th, td { padding: 5px; }
 thead, tfoot, tr:nth-child(even) { background: #eee; }
 .hl { background-color: #ffc; }
+
+@media (prefers-color-scheme: dark) {
+	body {
+		background-color: #111;
+		color: white;
+	}
+	article > header, nav > ul a {
+		background: #222;
+	}
+	a {
+		color: #C4D4EE;
+	}
+	a:visited {
+		color: #CEDEE0;
+	}
+	code { background-color: #444; }
+	thead, tfoot, tr:nth-child(even) { background: #222; }
+	.hl {
+		background-color: #555;
+	}
+}