Closed Bug 1513530 Opened 5 years ago Closed 5 years ago

Doorhanger menu icons are misaligned on Linux

Categories

(DevTools :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: fvsch, Assigned: fvsch)

Details

Attachments

(2 files)

It seems that the doorhanger menu icons are aligned using `vertical-align: top;`. This works well if we have a small font-size (around 13px), but with a bigger font-size and line-height (e.g. 16px) they appear above the baseline (see screenshot).

At least on Linux, the font-size in menus may vary, and we probably want to keep that possible instead of overriding it (we do override it in panels, but these menus should work like Firefox doorhanger menus and respect that setting if possible).

A simple fix would be to align the icons relative to the text's baseline.

`vertical-align: -3px` seems to work well for font-sizes between 12px and 16px.

`vertical-align: middle` appears way too low for some reason.
Assignee: nobody → florens
Status: NEW → ASSIGNED
Tried a few other options, such as Flexbox alignment (works well, but risks more regressions) and `vertical-align: middle` with a transform to shift pixels higher. IMO `vertical-align: -3px` is the least bad solution.
Pushed by florens@fvsch.com:
https://hg.mozilla.org/integration/autoland/rev/eff867a24e77
Improve doorhanger menu icons alignment; r=gl
https://hg.mozilla.org/mozilla-central/rev/eff867a24e77
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: