From e1527d033a85ba79bd65b16dce7e2129fc523d25 Mon Sep 17 00:00:00 2001 From: axtlos Date: Sun, 15 Jan 2023 13:27:06 +0100 Subject: Add auto dark mode --- style.css | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'style.css') diff --git a/style.css b/style.css index b89918e..83ae18f 100644 --- a/style.css +++ b/style.css @@ -5,8 +5,10 @@ /* Global defaults. */ + + html { max-width: 65em; margin: auto; } -body { font-family: Helvetica,Arial,sans-serif; } +body { font-family: Helvetica,Arial,sans-serif; background: white; } table { margin-top: 0em; margin-bottom: 0em; } td { vertical-align: top; } @@ -251,3 +253,31 @@ a.In { } .HP { margin-left: 2em; text-indent: -2em; } } + +@media (prefers-color-scheme: dark) { + /* If the operating system is using dark mode, then apply this CSS */ + body { + background: #46494f; + } + td { + color: white; + } + h1 { + color: white; + } + p { + color: white; + } + section { + color: white; + } + .permalink { + color: #6d8ecf; + } + a:link { + color: #6d8ecf; + } + a:visited { + color: #f6baff; + } +} -- cgit v1.2.3