-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Bug-1958596 dark_theme manifest key documentation
#39122
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
Open
rebloor
wants to merge
5
commits into
mdn:main
Choose a base branch
from
rebloor:Bug-1958596-dark_theme-manifest-key-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
609b624
Bug-1958596 `dark_theme` manifest key documentation
rebloor 0edb5a2
Clarification over `"theme"` usage
rebloor f6b2c5a
Remove broken Firefox for Android link
rebloor 9455ee8
Apply Linter suggestions
rebloor 08233cf
Merge branch 'main' into Bug-1958596-dark_theme-manifest-key-document…
rebloor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
files/en-us/mozilla/add-ons/webextensions/manifest.json/dark_theme/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| title: dark_theme | ||
| slug: Mozilla/Add-ons/WebExtensions/manifest.json/dark_theme | ||
| page-type: webextension-manifest-key | ||
| browser-compat: webextensions.manifest.dark_theme | ||
| --- | ||
|
|
||
| {{AddonSidebar}} | ||
|
|
||
| <table class="fullwidth-table standard-table"> | ||
| <tbody> | ||
| <tr> | ||
| <th scope="row">Type</th> | ||
| <td><code>Object</code></td> | ||
| </tr> | ||
| <tr> | ||
| <th scope="row">Optional</th> | ||
| <td>No</td> | ||
| </tr> | ||
| <tr> | ||
| <th scope="row">Manifest version</th> | ||
| <td>2 or higher</td> | ||
| </tr> | ||
| <tr> | ||
| <th scope="row">Example</th> | ||
| <td> | ||
| <pre class="brush: json"> | ||
| "dark_theme": { | ||
| "images": { | ||
| "theme_frame": "images/moon.jpg" | ||
| }, | ||
| "colors": { | ||
| "frame": "#CF723F", | ||
| "tab_background_text": "#000" | ||
| } | ||
| }</pre | ||
| > | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
|
|
||
| Use the `dark_theme` key to define a static theme to apply when Firefox is using the dark color scheme. The `dark_theme` key uses the same syntax and supports the same image, color, and property objects as the `theme` key. | ||
|
|
||
| See the [`theme` key](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme) for more information. | ||
|
|
||
| ## Browser compatibility | ||
|
|
||
| {{Compat}} | ||
|
|
||
| ### Chrome compatibility | ||
|
|
||
| In Chrome: | ||
|
|
||
| - `colors/toolbar_text` is not used, use `colors/bookmark_text` instead. | ||
| - `images/theme_frame` anchors the image to the top left of the header and if the image doesn't fill the header area tile the image. | ||
| - all colors must be specified as an array of RGB values, like this: | ||
|
|
||
| ```json | ||
| "theme": { | ||
| "colors": { | ||
| "frame": [255, 0, 0], | ||
| "tab_background_text": [0, 255, 0], | ||
| "bookmark_text": [0, 0, 255] | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| The array form and the CSS color form are accepted for all properties. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
As best I can tell Chrome doesn't support the
dark_thememanifest key for themes. @oliverdunk, can you help verify this?