map: support dark mode

pull/396/head
Varun Patil 2023-02-09 09:17:24 -08:00
parent f7b7fa2ac8
commit 5f07ffd5c9
1 changed files with 15 additions and 0 deletions

View File

@ -187,6 +187,21 @@ export default defineComponent({
z-index: 100000 !important;
}
// Dark mode
$darkFilter: invert(1) grayscale(1) brightness(1.3) contrast(1.3);
.leaflet-tile-pane {
body[data-theme-dark] &,
body[data-theme-dark-highcontrast] & {
filter: $darkFilter;
}
@media (prefers-color-scheme: dark) {
body[data-theme-default] & {
filter: $darkFilter;
}
}
}
@keyframes fade-in {
0% {
opacity: 0;