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

> I strongly strongly dislike the syntax "(prefers-color-scheme: dark)"

The syntax is the media queries syntax (`<media-query-list>`). The limitation of "light" and "dark" as keys is that it's restricted to, well, just "light" and "dark". With using a media query, we get the full ability to check of any `<media-query-list>` matches.

And interesting discussion to have is if having full-blown `<media-query-list>` support is worth while or overkill. 

From an extensibility perspective, it's pretty nice. 

However, the challenge we face is then who actually evaluates the `<media-query-list>` to do the member selection? If it's the OS, then `"light"` and `"dark"` is definitely better: we can't expect an OS to do anything worthwhile with `<media-query-list>`, and converting `<media-query-list>` to something that the OS understands would be quite challenging and error prone. 

If it's the user agent doing the selection, then `<media-query-list>` would be most appropriate. 

> It is very unintuitive to tell developers that the order of these keys matters; it goes against decades of experience in virtually all modern programming languages.

Except JS and on the Web Platform, where the order is retained. What happens in those other languages doesn't seems particularly relevant, as we are dealing with the web platform where order of JSON members is retained and significant. 

-- 
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-853558391

Received on Thursday, 3 June 2021 04:47:11 UTC