diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2024-02-13 13:43:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 13:43:43 (GMT) |
commit | d7a7c3b54950bd472bba9348cff2239f9a84b6aa (patch) | |
tree | ea6ccb3c61d8de8e231b5d27935447a6edddb8e4 | |
parent | 7ea6df3ae918309e94fa730ae76b01a7c04505d1 (diff) | |
parent | e40ed8e8fc3cacb89390db28f0acf712461b4bc4 (diff) | |
download | Ninja-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.css | 26 |
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; } |