Closed Bug 1792736 Opened 2 years ago Closed 2 years ago

Expose zap_gradient experimental theme property to themed system pages

Categories

(Firefox :: Theme, enhancement)

Desktop
Unspecified
enhancement

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: aminomancer, Assigned: aminomancer)

References

Details

Attachments

(1 file)

This is a suggestion to help with bug 1770534, an issue that arises when themed system pages use some static colors that were designed around the default themes. In some cases these colors are actually defined by the theme experiment API, but they're currently only exposed to the browser chrome.

We could resolve this problem and potentially future theme issues by exposing to the content any experimental properties in the ThemeContentPropertyList. With those properties exposed, the content stylesheets can fall back to some generic property value that looks inoffensive for any theme (or is based on other theme properties like ntp_background).

In the case of bug 1770534, the default themes set zap_gradient to a rainbow gradient. So we can pass that down to the content, and when that property is not set (e.g. for Colorways), we can just fallback to a generic color.

There might be some reason to attempt to validate the theme property values before exposing them to system pages, but the LightweightThemeConsumer does not currently do anything like that before exposing them to the chrome.

Another option would be to change the experiment API so it also has a dedicated content stylesheet, and update the built-in themes accordingly, but in this case it seems excessive since the property we want is already used in the chrome (the rainbow line in the app menu).

Pass down the zap_gradient experimental theme property to pages that
load contentTheme.js, and use it to set the zap gradient value in
Firefox View (with a generic fallback color for themes that don't set
this experimental property)

Assignee: nobody → shughes
Status: NEW → ASSIGNED
Blocks: 1770534
See Also: 1770534
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ecbc2f44299
Expose zap_gradient theme property to system pages. r=desktop-theme-reviewers,dao
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: