-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a color_scheme
member to ImageResource
#758
Comments
Generally, this sounds good. Would probably need to tweak to color_scheme values a little bit, but nothing big. Ideally, we would just reuse whatever CSS is using. Could you please provide a link? |
The spec for this is here. In CSS, you'd do something like this (greatly simplified): /* Default assumes light theme */
body {
background-color: white;
color: black;
}
/* For dark mode folk, invert */
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
} So we could either make the values of Alternatively, we could add more properties like |
Worth noting: there is some discussion around potentially aligning Microsoft’s high-contrast proposal with |
Another interesting side note: some OSes (like Windows) currently invert black icons to white and vice versa. Based on conversations with a few devs, they seemed to lean toward that being fine for "no preference" images, but not for ones with a preferred color scheme. Makes sense to me as well. |
Yeah, high contrast mode and inverted color mode generally are considered a medical necessity, so people are fine if things look a little off rather than not being able to see/read anything at all [citation needed]. Dark mode is a little different (I have survey results on that that I’m going to publish soon). The gist being some users need it, but some users also just appreciate the elegance. |
I was experimenting with leveraging the |
Interesting. I guess one thing I question—and I know this is a semi-loaded topic—is what the development community’s appetite would be for maintaining multiple manifests. This is already somewhat of an open question with respect to translations. Would we want developers to have to maintain multiple permutations of "light" and "dark" icon versions of multiple language-specific manifests? That seems like a bumpy road to go down. |
Open to discussing this (and related topics) @ TPAC today or tomrrow. |
See GoogleChrome/lighthouse#3891 (comment), |
Migrated to ImageResource#26 |
With operating systems beginning to offer multiple color schemes (e.g., “dark mode” and “light mode”) and with CSS offering a media query for that user preference, it is important to enable web apps to offer appropriate iconography for the context. As such, we need to upgrade the ImageResource dictionary to include an optional member indicating which color scheme a given image should be associated with.
I’ve worked up an explainer on this here: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/ImageResource-color_scheme/explainer.md
Related: #618
The text was updated successfully, but these errors were encountered: