Re: [w3c/manifest] Add support for defining a theme color for both light & dark modes (prefers color scheme) (#975)

I like the elegancy of the [above proposal](https://github.com/w3c/manifest/issues/975#issuecomment-851962609) and move my thumbs up to this:

```json
"media_overrides": {
  "(prefers-color-scheme: dark)": {
    "theme_color": "#fff",
    "background_color": "#000"
  },
  "(prefers-color-scheme: light)": {
    "theme_color": "#000",
    "background_color": "#fff"
  }
}
```

The approach feels very familiar to how you'd do this in CSS:

```css
@media (prefers-color-scheme: dark) {
  /* … */
}
```

As an analogy, for processing `<link media>`, the [spec](https://html.spec.whatwg.org/multipage/semantics.html#processing-the-media-attribute) simply says the resource must be applied if the media query matches. In case of multiple matches, I'd vouch for using the last matching one.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/975#issuecomment-851967998

Received on Tuesday, 1 June 2021 09:15:25 UTC