summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-04-08 16:01:26 +0200
committerstuebinm2021-04-08 16:04:36 +0200
commit7e38d7f84463342dd428e7400777fdc675a8fbce (patch)
tree379d45cf07979be2b509ad869cbe67752b9f1edd
parent215ca162c2c767df56a4802ed7edde7fd5e7fbd0 (diff)
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.
Diffstat (limited to '')
-rw-r--r--site/style.css26
-rw-r--r--todo.org3
2 files changed, 27 insertions, 2 deletions
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;
+ }
+
+}
diff --git a/todo.org b/todo.org
index b5f0d88..3ea98c0 100644
--- a/todo.org
+++ b/todo.org
@@ -17,9 +17,8 @@
* TODO List of public surveys
* IDEA CLI tool for age batch decryption & conversion to .csv
-
* TODO UI
** IDEA Surveys with multiple pages
Seems unclear how to do this in a way that also works with screen readers etc.
-** TODO Automatic Dark mode
** TODO Support for multiple languages (defined via config.dhall)
+** DONE Automatic Dark mode