--newtab variables are no longer accessible from Firefox View with "System theme - auto" on Windows and macOS
Categories
(Firefox :: Theme, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox-esr115 | --- | unaffected |
firefox117 | --- | unaffected |
firefox118 | --- | unaffected |
firefox119 | --- | verified |
People
(Reporter: kcochrane, Assigned: kcochrane)
References
(Depends on 1 open bug, Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(3 files)
To reproduce:
Set your browser's theme to "System theme - auto" and set your OS-level theme to Dark.
Notice how the body background color of Firefox View is now falling back to --in-content-page-background
which is much darker than the expected --newtab-background-color
.
In Firefox View, we define a CSS variable for the background color here that's defaulted to use --newtab-background-color
, but falls back to --in-content-page-background
if that's not found.
We should ideally work out a way to reuse the variables defined in activity-stream-[os].css
files such as here so we aren't redefining the same variable in two different places.
This was a regression caused by bug 1843044.
Comment 1•9 months ago
|
||
For context, this is not a regression on Linux, this never worked there.
Comment 2•9 months ago
|
||
Set release status flags based on info from the regressing bug 1843044
Assignee | ||
Comment 3•9 months ago
|
||
Jules, are these variables something we can consider adding to design-tokens-shared.css? It looks we have these colors/values hardcoded in activity-stream[os].css files for the New Tab page when we also rely on them in Firefox View and Shopping
Firefox View specifically relies on:
--newtab-background-color
--newtab-background-color-secondary
--newtab-text-primary-color
--newtab-primary-action-background
Comment 4•9 months ago
|
||
--newtab-background-color is defined as in-content-page-background for about:welcome/about:newab in the theme SASS file which in turn gets its value from the variables as #F9F9FB (light) / #2B2A33 (dark).
These colors show up in our XUL stylesheet for windows tooltips, as well as a few other places.
Updated•9 months ago
|
Updated•9 months ago
|
Comment 5•9 months ago
|
||
Hey Kelly, I am wondering if it's still possible for you to still make use of the activity-stream variables for now instead of us making these additions to design tokens.
There's an underlying issue here that I am hoping UX will help us decide with how we want light/dark mode to look like: like New tab code or like common-shared code. The problem today is that how we treat page background color and secondary background color variables (cards use this) today is different between these two contexts. I am attaching a picture that shows the differences.
I've spoken to Dao earlier this year about this, and have started a proposal to standardize our grays as well as their applications across different contexts. Ideally we standardize these colors through the tokens work so that we no longer have two page and secondary background colors going on. I can prioritize to solve this gray scale issue earlier in h2, and get the UX feedback.
Comment 6•9 months ago
|
||
:dao could this be triaged for severity?
Do you need to address this for Fx119, or will it be in a later release?
Comment 7•9 months ago
|
||
Three possible solutions here:
- update common-shared.css to use the same color values for the relevant colors from activity-stream.
- update activity-stream to use the the same color values for the relevant colors from common-shared.css.
- have Firefox View specify default values for the relevant new-tab variables, copying over the color values from activity-stream.
Jules, what would be the preferred fix here from a design system perspective?
Assignee | ||
Comment 8•9 months ago
|
||
We are hoping to get a fix in for Fx119 if possible. I'm happy to pick this work up whenever Jules weighs in on a preferred solution from above.
Comment 9•9 months ago
|
||
Yes, to clarify, we're looking for a short-term fix here while waiting for bug 1821203.
Comment 10•9 months ago
|
||
Hey Dão, I'd say from the systems perspective for now, although not necessarily ideal, to go ahead and choose option 3:
"have Firefox View specify default values for the relevant new-tab variables, copying over the color values from activity-stream."
Seems to me from recent work and talks with UX that they prefer the new tab colors, however it may be a bad idea to suddenly change dark mode in other about pages before we do the standardization of grays with 1821303. So if it's okay for now, it would be better if Fx View just has their domain-specific variables that copy activity-stream.
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 11•9 months ago
|
||
Comment 12•9 months ago
|
||
Pushed by kcochrane@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93fd62af9c5c Copy newtab default css variables over to firefoxview-next.css r=dao,desktop-theme-reviewers,fxview-reviewers,sclements
Comment 13•9 months ago
|
||
bugherder |
Updated•8 months ago
|
Comment 14•8 months ago
|
||
Reproduced with Fx 119.0a1 (2023-09-11) on Windows 10.
Verified fixed with Fx 120.0a1 (2023-10-02) and Fx 119.0b4 on Windows 10 and macOS 13.
Description
•