From 7e38d7f84463342dd428e7400777fdc675a8fbce Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 8 Apr 2021 16:01:26 +0200 Subject: site: add a rudimentary dark mode This is a very simple, very high-contrast dark mode (for now). However, not all default ui elements seem to respect it by default — i.e. textareas stay entirely white by default and require additional theming. I'm not sure if this is my system stlye or firefox interfering, but for now I've added custom css rules which at least make text areas black. Buttons and checkboxes are still white, however. --- site/style.css | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'site/style.css') diff --git a/site/style.css b/site/style.css index b8be0dd..08f22a6 100644 --- a/site/style.css +++ b/site/style.css @@ -30,3 +30,29 @@ textarea { resize: vertical; min-height: 2em; } + + +@media screen and (prefers-color-scheme: dark) { + + html { + background-color: black; + color: white; + } + + body { + background-color: black; + box-shadow: none; + border: 2px solid white; + border-radius: 1em; + } + + .error { + color: red; + } + + textarea { + color: white; + background-color: black; + } + +} -- cgit v1.2.3