Closed
Bug 1450554
Opened 7 years ago
Closed 7 years ago
Identity box security text color has low contrast on dark themes
Categories
(Firefox :: Theme, defect, P3)
Firefox
Theme
Tracking
()
RESOLVED
FIXED
Firefox 61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: ntim, Assigned: ntim)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
No description provided.
Comment 1•7 years ago
|
||
Hello :ntim
I want to work on this bug because now I want to improve level.
Can you guide me, how I can edit code for this bug?
Thanks
Flags: needinfo?(ntim.bugs)
Updated•7 years ago
|
Priority: -- → P3
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8969978 -
Flags: review?(jaws) → review?(jhofmann)
Assignee | ||
Updated•7 years ago
|
Attachment #8969978 -
Flags: review?(jaws)
Attachment #8969978 -
Flags: review?(dao+bmo)
Assignee | ||
Comment 4•7 years ago
|
||
Set multiple reviewers since both jaws and johannh are "slow to respond". :)
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8969978 [details]
Bug 1450554 - Fix identity box security color on dark themes.
https://reviewboard.mozilla.org/r/238760/#review245612
This makes sense to me, noting that I don't know much about the theme API parts :)
Thanks!
::: browser/themes/shared/identity-block/identity-block.inc.css:34
(Diff revision 1)
>
> #urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #identity-icon-labels {
> color: #058B00;
> }
> +
> +:root[lwt-toolbar-field-brighttext] #urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #identity-icon-labels {
Do we still need the #urlbar[pageproxystate="valid"] parts in this rule and above? Aren't the labels always hidden in invalid pageproxystate anyway?
Not a problem with your patch, though :)
::: toolkit/modules/LightweightThemeConsumer.jsm:58
(Diff revision 1)
> + if (!rgbaChannels) {
> + element.removeAttribute("lwt-toolbar-field-brighttext");
> + return null;
> + }
> + const {r, g, b, a} = rgbaChannels;
> + const luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b;
You should have a shared function for computing the luminance.
Attachment #8969978 -
Flags: review?(jhofmann) → review+
Comment hidden (mozreview-request) |
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8969978 [details]
Bug 1450554 - Fix identity box security color on dark themes.
https://reviewboard.mozilla.org/r/238760/#review245678
::: toolkit/modules/LightweightThemeConsumer.jsm:33
(Diff revisions 1 - 2)
> element.removeAttribute("lwtheme");
> return null;
> }
> const {r, g, b, a} = rgbaChannels;
> - const luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b;
> + const luminance = _getLuminance(r, g, b);
> element.setAttribute("lwthemetextcolor", luminance <= 110 ? "dark" : "bright");
You can share more here, namely the luminance <= 110 part, and rename the function to isTextColorDark or something.
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Dão Gottwald [::dao] from comment #7)
> Comment on attachment 8969978 [details]
> Bug 1450554 - Fix identity box security color on dark themes.
>
> https://reviewboard.mozilla.org/r/238760/#review245678
>
> ::: toolkit/modules/LightweightThemeConsumer.jsm:33
> (Diff revisions 1 - 2)
> > element.removeAttribute("lwtheme");
> > return null;
> > }
> > const {r, g, b, a} = rgbaChannels;
> > - const luminance = 0.2125 * r + 0.7154 * g + 0.0721 * b;
> > + const luminance = _getLuminance(r, g, b);
> > element.setAttribute("lwthemetextcolor", luminance <= 110 ? "dark" : "bright");
>
> You can share more here, namely the luminance <= 110 part, and rename the
> function to isTextColorDark or something.
Filed bug 1457099 since I already triggered landing on autoland.
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7e1f48fed0da
Fix identity box security color on dark themes. r=johannh
Comment 10•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
You need to log in
before you can comment on or make changes to this bug.
Description
•