-
Notifications
You must be signed in to change notification settings - Fork 16
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
Web Preferences API #117
Comments
I've made a very rough draft of a spec: https://specs.lukewarlow.dev/web-preferences-api/ |
Idk if I count as a potential implementor? But I'm in the progress of making a start on a prototype in Chromium. |
If you're implementing, you're an implementor! :) |
I'm generally positive. Unsure if navigator is the right place, and which spec it should live in. Currently looks like all values are MQ-related, but that might change? Also, I'd have to think through the iframe behavior. The color-scheme behavior for things like iframes and embedded SVGs is somewhat complicated, and I'm unsure off-the-top-of-my-head how that would work with this API. But those details can be fleshed out. This API would also be useful for devtools, which currently in Chromium-based browsers has a separate protocol for overriding media query values. |
Glad to see there's support for this! If you want to move this to WICG, feel free to transfer the repo to me and I can do the rest. |
I’m personally very supportive of this proposal as it would allow authors to more easily implement Dark Mode Toggle Buttons without needing to duplicate parts of their CSS nor resort to blocking JS – a problem I’ve written about before, at https://www.bram.us/2022/05/25/dark-mode-toggles-should-be-a-browser-feature/ Very excited. |
@yoavweiss I've just requested a transfer to you :) |
Yeah absolutely there's a few specifics I'm unsure of atm sub-resources is definitely one of them.
In my very rough prototype I decided to keep it so dev tools' override is separate to this site preference but again that's something we can nail down in time. Thanks for taking a look everyone! |
The repo now lives at https://github.com/WICG/web-preferences-api Happy incubating!! |
Web Preferences API
Introduction
The Web Preferences API aims to provide a way for sites to indicate a user preference for a given pre-defined setting (e.g. color-scheme preference) in a way that fully integrates with existing Web APIs.
Read the complete Explainer.
Feedback (Choose One)
I welcome feedback in this thread, but encourage you to file bugs against the Explainer.
The text was updated successfully, but these errors were encountered: