-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Dark theme support in embedded options pages fix #35778
Conversation
Preview URLs
External URLs (1)URL:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, could be even better by linking the relevant documentation. Could you add the following enhancement? Feel free to merge this PR and create a new PR for the change in web documentation.
@@ -39,6 +40,8 @@ To create an options page, write an HTML file defining the page. This page can i | |||
</html> | |||
``` | |||
|
|||
Note the use of `<meta name="color-scheme" content="dark light">`. This enables automatic switching between light and dark themes in the embedded UI based on the user's browser preferences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you link to MDN documentation for this?
Unfortunately I cannot find an easy main article for this. The meta tag is currently documented at:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name
Could you copy paste that to a new article under https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/color-scheme and interlink this new article and https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme to make it easier to find the two articles?
(Since the article content is so large, instead of copying, you could also trim some content in the original article to make the list of meta names more digestible).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Adds a release note and updates the options UI page with details of the updated favorite colors example and note about the addition of
<meta name="color-scheme" content="dark light" />
to support automatic theme switching. Provides documentation for Bug 1888866 Addons options_ui browser_style false doesn't properly handle dark mode on macOSRelated issues and pull requests
The corresponding change to the favorite colours example is in mdn/webextensions-examples#567