diff --git a/base.css b/base.css index 6e3f285..fdfe363 100644 --- a/base.css +++ b/base.css @@ -1,13 +1,26 @@ +:root { + --fg-light-mode: #454545; + --bg-light-mode: #fefefe; + --fg-dark-mode: #ccc; + --bg-dark-mode: #111; +} + body { font-family: monospace, sans-serif; - color: #454545; + color: var(--fg-light-mode); font-size: 16px; margin: 2em auto; max-width: 800px; padding: 1em; line-height: 1.4; overflow-wrap: break-word; - background-color: #fefefe; + background-color: var(--bg-light-mode); +} + +@media (prefers-color-scheme: dark) { + color: var(--fg-dark-mode); + background-color: var(--bg-dark-mode); + } a { color: #07a; }