This example demonstrates how to customize the fullscreen control icons and colors. Dark mode is just one example of theming.
Features:
mask-image to easily recolor icons using CSS--fullscreen-icon-enter/exitprefers-color-schemeTry it:
Customization:
Override the icon variables in your CSS (supports URL or inline SVG data-uri):
:root {
--fullscreen-icon-enter: url('data:image/svg+xml;...');
--fullscreen-icon-exit: url('your-exit-icon.svg');
}
/* Optional: Change icon color */
.leaflet-fullscreen-icon::before {
background-color: #ff0000;
}