Support dark mode
See original GitHub issueAdd a prefers-color-scheme CSS media query for dark mode.
Something like:
.leaflet-bar a,
.leaflet-bar a:hover {
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
}
@media (prefers-color-scheme: light) {
.leaflet-bar a,
.leaflet-bar a:hover {
background-color: #fff;
border-bottom: 1px solid #ccc;
color: black;
}
}
@media (prefers-color-scheme: dark) {
.leaflet-bar a,
.leaflet-bar a:hover {
background-color: #000;
border-bottom: 1px solid #333;
color: white;
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Supporting Dark Mode in Your Interface - Apple Developer
The dark appearance, known as Dark Mode, implements an interface style that many apps already adopt. Users choose the aesthetic they prefer, and...
Read more >Browse in Dark mode or Dark theme - Google Chrome Help
When you browse in Dark mode or Dark theme in Chrome, your homepage, toolbar, settings, and some other pages will be dark. Android...
Read more >Adapting Your App to Support Dark Mode - RayWenderlich.com
In this tutorial, you'll learn how to add support for Dark Mode in your app, making it look great in low-light environments.
Read more >Dark Mode: Adding support to your app in Swift - SwiftLee
Dark Mode was introduced in iOS 13 and announced at WWDC 2019. It adds a darker theme to iOS and allows you to...
Read more >Dark theme - Android Developers
Dark theme · Can reduce power usage by a significant amount (depending on the device's screen technology). · Improves visibility for users with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Something like this:
A note on backwards compatibility:
The “light” styles (the current styles applied by default) should remain outside a
prefers-color-scheme
media query, otherwise nothing will apply in browsers that do not support that media feature. I.e. only aprefers-color-scheme: dark
media query is necessary (to override the default light colors).