-
Notifications
You must be signed in to change notification settings - Fork 5
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
#26
Comments
This looks like something we'll want to implement on Chrome OS. While websites today have dynamic control over their color scheme using HTML, they aren't able to dynamically change the color scheme until the page is loaded. During that time, the user will see a "flash" of the window dressing in the app's default theme color, before the page loads and dynamically sets it to dark mode (for example). Having declarative rules about dark mode (for instance) lets you fix that flash in most cases. Is this work progressing? Do you need engineering / standards support? |
@mgiuca Awesome news! I would love to see this land for I have been waiting for someone to be ready to move this forward, so I am more than happy to work to bring it to |
We will support |
Just wanted to register my support for this proposal. I work on PWABuilder.com, which packages PWAs for app stores like Google Play and Microsoft Store. We are very interested in supporting different icons for different OS color themes. Aaron's proposal for |
Hmm, I feel like doing it for ImageResources is a bit the wrong way around. Like wouldn't it be much easier (and more impactful) to do this for That's what I had in mind. I'm happy for you to add it for ImageResources too, but I think we'll be putting our eng resources (on Chrome) towards implementing this in the theme color, to avoid that flash of light mode colour and switching into dark mode once the page loads. |
@mgiuca Not sure specifically what "it" is in your comment, but this is to enable specific Ideally, if an icon (for a PWA or a Push Notification) could be a color-scheme aware SVG you wouldn’t need to use this member of the |
Instead of "icons": [
{
"src": "/icons/play-later.svg",
"type": "image/svg+xml",
"purpose": "any",
"media": "(prefers-color-scheme: light)"
},
{
"src": "/icons/play-later-reverse.svg",
"type": "image/svg+xml",
"purpose": "any",
"media": "(prefers-color-scheme: dark)"
}
] |
Agree about |
Let’s see where that conversation goes… I do agree this could be helpful though. One use case that jumps out is being able to pick up screenshots that are portrait or landscape based on the MQ rather than having to (potentially) consult image dimensions. |
@marcoscaceres @loubrett @mgiuca @tomayac Given how close we are on |
I’d vouch for abandoning the proposal in favor of |
Yeah, let's go the |
The only thing that gives me pause is that Notifications and Payment Request API both use this construct as well, right? How will they handle user preferences? Also, reflecting on @marcoscaceres’ comments on Thoughts? |
Sorry, can you clarify what you mean here by "use this construct"? |
Don't both of those specs make use of |
Yeh this could be a good way to handle user preferences and translations. I think icons is the only field that has crossover here? If we went with this approach would we also allow icons to be redefined in |
Ah, sorry - now remembering. Thanks for the additional context! It was going to be Payment Handler to replace the About Notifications, it uses a URL. But there may have been some other spec...
Ah, that's right. We wanted a generalized means of representing an image resource in contexts where where |
@loubrett wrote:
Yes, basically we would allow redefining everything. |
Migrating from Manifest#758
The text was updated successfully, but these errors were encountered: