Skip to content

Commit

Permalink
Add dark mode using CSS 'filter: invert hue-rotate' trick
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low committed Nov 16, 2024
1 parent b50ef87 commit 9fa541c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9fa541c

Please sign in to comment.