summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCole Faust <colecfaust@gmail.com>2023-12-31 22:35:24 (GMT)
committerCole Faust <colecfaust@gmail.com>2023-12-31 22:40:32 (GMT)
commite40ed8e8fc3cacb89390db28f0acf712461b4bc4 (patch)
tree8a57bcc225dcd059eabb56f5b335a007230c778e
parent766eca4306f327b213c10acd245666d893035f4d (diff)
downloadNinja-e40ed8e8fc3cacb89390db28f0acf712461b4bc4.zip
Ninja-e40ed8e8fc3cacb89390db28f0acf712461b4bc4.tar.gz
Ninja-e40ed8e8fc3cacb89390db28f0acf712461b4bc4.tar.bz2
Add a dark mode to the docs
-rw-r--r--doc/style.css26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/style.css b/doc/style.css
index 9976c03..363e272 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -1,15 +1,22 @@
+:root {
+ color-scheme: light dark;
+}
+
body {
margin: 5ex 10ex;
max-width: 80ex;
line-height: 1.5;
font-family: sans-serif;
}
+
h1, h2, h3 {
font-weight: normal;
}
+
pre, code {
font-family: x, monospace;
}
+
pre {
padding: 1ex;
background: #eee;
@@ -17,13 +24,32 @@ pre {
min-width: 0;
font-size: 90%;
}
+@media (prefers-color-scheme: dark) {
+ pre {
+ background: #333;
+ border: solid 1px #444;
+ }
+}
+
code {
color: #007;
}
+@media (prefers-color-scheme: dark) {
+ code {
+ color: #a7cec8;
+ }
+}
+
div.chapter {
margin-top: 4em;
border-top: solid 2px black;
}
+@media (prefers-color-scheme: dark) {
+ div.chapter {
+ border-top: solid 2px white;
+ }
+}
+
p {
margin-top: 0;
}