Open
Description
Currently there is no way to take the power saving preferences into account. Having a media query to check these (if technically possible), would help creating more sustainable websites. Even if it's not technically possible yet, it might be a thing to consider for future development.
Example:
/* Battery saving mode enabled */
@media (prefers-battery-saving: high) {
body {
background: #000;
}
}
/* Battery saving mode disabled */
@media (prefers-battery-saving: none) {
body {
background: #fff;
}
}
The media query could be used to:
- load lower resolution images & videos or prevent loading them in general
- use darker colors for OLED screens (darker than dark mode)
- disable transitions and animations (like
prefers-reduced-motion
) - toggle specific JS functions via
matchMedia
- load different Fonts
I think the impact of the media query could be huge and it would be a step in the right direction for a more sustainable web.