summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2024-02-13 13:43:43 (GMT)
committerGitHub <noreply@github.com>2024-02-13 13:43:43 (GMT)
commitd7a7c3b54950bd472bba9348cff2239f9a84b6aa (patch)
treeea6ccb3c61d8de8e231b5d27935447a6edddb8e4
parent7ea6df3ae918309e94fa730ae76b01a7c04505d1 (diff)
parente40ed8e8fc3cacb89390db28f0acf712461b4bc4 (diff)
downloadNinja-d7a7c3b54950bd472bba9348cff2239f9a84b6aa.zip
Ninja-d7a7c3b54950bd472bba9348cff2239f9a84b6aa.tar.gz
Ninja-d7a7c3b54950bd472bba9348cff2239f9a84b6aa.tar.bz2
Merge pull request #2369 from Colecf/dark_mode
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;
}