[csswg-drafts] [mediaqueries-5] Add media query for power saving mode (#7389)

Que-tin has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] Add media query for power saving mode ==
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.

Example:
```css
/* 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. 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7389 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 20 June 2022 06:55:47 UTC