Open
Bug 1461617
Opened 7 years ago
Updated 3 years ago
LWTConsumer should be consistent in fallback accentcolor (and/or line above tabs) when none/"#" is present in the lwtheme data
Categories
(WebExtensions :: Themes, defect, P3)
WebExtensions
Themes
Tracking
(firefox62 affected)
NEW
| Tracking | Status | |
|---|---|---|
| firefox62 | --- | affected |
People
(Reporter: Gijs, Unassigned)
References
Details
STR:
1. install https://addons.mozilla.org/en-US/firefox/addon/dream-of-waves/ (comes with accentcolor: "#")
2. note black colour at the top of tabs
3. update the theme (accentcolor will be gone) and restart firefox or open a new window
4. note white colour at the top of tabs
AR:
colour changes
ER:
should be consistent
Historically this line has been black for these themes, but for the accentcolor a white fallback makes more sense. Not sure how best to proceed here.
Comment 1•7 years ago
|
||
The easiest way to fix this is to use "white" or null as default on the AMO side. There's really no nice way to fix it on the Firefox front-end, as the front-end has no nice way to differentiate between an invalid color and black.
One possible hacky way to fix this on the Firefox side is:
let div1 = doc.createElementNS(HTML_NS, "div");
div1.style.color = "black";
let span1 = doc.createElementNS(HTML_NS, "span");
span1.style.color = cssColor;
div1.appendChild(span1);
let div2 = doc.createElementNS(HTML_NS, "div");
div2.style.color = "white";
let span2 = doc.createElementNS(HTML_NS, "span");
span2.style.color = cssColor;
div2.appendChild(span2);
if (doc.defaultView.getComputedStyle(span1).color != doc.defaultView.getComputedStyle(span2).color) {
return null;
}
return doc.defaultView.getComputedStyle(span1).color;
But since AMO has the information directly regarding the absence of accentcolor, it might be worth fixing this directly on the AMO side ?
Comment 2•7 years ago
|
||
From bug 1460287 comment 12: Options include using the text color instead of the accent color for the tab line, and/or letting authors set the tab line color explicitly.
Using the awfully poorly named "accent color" for the tab line is a hack, it wasn't originally intended to be used there.
Comment 3•7 years ago
|
||
Marking as P3, but comment 2 seems to suggest it might be more serious than that and a potential P1. Feel free to mark it appropriately if that's the case!
Priority: -- → P3
Updated•7 years ago
|
Product: Toolkit → WebExtensions
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•