WebExtension API to toggle prefers-color-scheme for light/dark/system mode
Categories
(WebExtensions :: General, enhancement, P5)
Tracking
(firefox95 fixed)
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: me, Assigned: me)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
In 93, a new preference has appeared to toggle the preferred color scheme:
layout.css.prefers-color-scheme.content-override
See: https://hg.mozilla.org/integration/autoland/rev/399441fe2466
It’s not modifiable from a WebExtension currently.
Expected results:
I would be nice for this preference to be exposed through the WebExtension API. Maybe through the browser.theme that currently only exists in Firefox:
See: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/theme
I would be willing to take a look into it, given some input on whether this seems a good idea to power that be, and a pointer or 2 over where to do the changes.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Changing severity to S5 because of patches welcome.
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/48501517af5e Add a webextension preference to override light or dark color scheme. r=mixedpuppy
Comment 5•2 years ago
|
||
bugherder |
Comment 6•2 years ago
|
||
Bug 1529323 added another supported value, so the options are now dark, light, system and browser. Please document the API in browser-compat-data and MDN.
Comment 8•2 years ago
|
||
Content to address dev-doc-needed is now available for review:
Updated•2 years ago
|
Description
•