Skip to content

Commit

Permalink
Merge pull request #2369 from Colecf/dark_mode
Browse files Browse the repository at this point in the history
Add a dark mode to the docs
  • Loading branch information
jhasse authored Feb 13, 2024
2 parents 7ea6df3 + e40ed8e commit d7a7c3b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions doc/style.css
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
: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;
border: solid 1px #ddd;
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;
}

0 comments on commit d7a7c3b

Please sign in to comment.