From 9fa541cf4fb5d39e88936323acf1edc08d6db7df Mon Sep 17 00:00:00 2001 From: Jake Low Date: Sat, 16 Nov 2024 13:44:51 -0800 Subject: [PATCH] Add dark mode using CSS 'filter: invert hue-rotate' trick --- src/index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/index.html b/src/index.html index 51b69f7d6..76f64f93c 100644 --- a/src/index.html +++ b/src/index.html @@ -22,6 +22,14 @@ bottom: 0; width: 100%; } + + /* quick and dirty dark mode hack */ + @media (prefers-color-scheme: dark) { + #map { + filter: invert(1) hue-rotate(180deg) saturate(75%); + } + } + #attribution-logo { position: absolute; bottom: 10px;