Use inheritance for menu fonts

RESOLVED FIXED in Firefox 63

Status

()

enhancement
P3
normal
RESOLVED FIXED
Last year
10 months ago

People

(Reporter: dao, Assigned: dao)

Tracking

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(3 attachments)

Rather than setting a font on every single menuitem and friends, we should set it on the parent and let it be inherited (font is inherited by default just like color).
Posted patch patchSplinter Review
Attachment #8998735 - Flags: review?(mstriemer)
Comment on attachment 8998735 [details] [diff] [review]
patch

Review of attachment 8998735 [details] [diff] [review]:
-----------------------------------------------------------------

Poked around and didn't see any regressions. Looks like a nice cleanup to me.

::: toolkit/themes/linux/global/menu.css
@@ +71,5 @@
>    color: -moz-menubarhovertext;
>    background-color: -moz-menuhover;
>  }
> +
> +menuitem[default="true"],

This rule appears to be in windows, linux and osx. Can it be moved to shared instead?
Attachment #8998735 - Flags: review?(mstriemer) → review+
(In reply to Mark Striemer [:mstriemer] from comment #3)
> Comment on attachment 8998735 [details] [diff] [review]
> patch
> 
> Review of attachment 8998735 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Poked around and didn't see any regressions. Looks like a nice cleanup to me.
> 
> ::: toolkit/themes/linux/global/menu.css
> @@ +71,5 @@
> >    color: -moz-menubarhovertext;
> >    background-color: -moz-menuhover;
> >  }
> > +
> > +menuitem[default="true"],
> 
> This rule appears to be in windows, linux and osx. Can it be moved to shared
> instead?

I don't think there's a shared stylesheet where this would fit and I wouldn't create one for just one rule. However, I can look into whether there's more to share from menu.css in a followup.
Keywords: checkin-needed
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1c63d5a13deb
Use inheritance for menu fonts. r=mstriemer
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1c63d5a13deb
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
This seems to have slightly increased the font-size of <select> options on macOS.
It looks like https://hg.mozilla.org/mozilla-central/diff/1c63d5a13deb/toolkit/themes/osx/global/menu.css#l1.98 and https://hg.mozilla.org/mozilla-central/diff/1c63d5a13deb/toolkit/themes/osx/global/menu.css#l1.77 made menuitems in menulists use -moz-pull-down-menu. The reason for the 'inherit' was to use the the same font as the menulist itself (which normally inherit the font from the parent). You can see the effect in the clear history menulist.
Depends on: 1483153
See Also: → 1483503
Depends on: 1485867
Depends on: 1500213
You need to log in before you can comment on or make changes to this bug.