Closed Bug 1661272 Opened 5 years ago Closed 5 years ago

In-content UX and add-ons have very small fonts

Categories

(Core :: Widget, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- unaffected
firefox81 --- unaffected
firefox82 --- disabled
firefox83 --- fixed

People

(Reporter: gcp, Assigned: spohl)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Current Nightly, Linux, widget.disable-native-theme-for-content = true

about:downloads (and likely similar pages) and add-ons (such as uBlock Origin) have very small fonts now, likely a new regression from non-native theming changes.

Regressed by: 1656264
Has Regression Range: --- → yes
Severity: -- → S2

Inspector indicates the font size changed from 14.66px to 13px.

So this is because we are using the theme there, and we're forcing all the system font sizes to be effectively default-font-size - 3px (which is 13px in your case).

I think we should limit it to the fonts we care about.

Set release status flags based on info from the regressing bug 1656264

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

So this is because we are using the theme there, and we're forcing all the system font sizes to be effectively default-font-size - 3px (which is 13px in your case).

I think we should limit it to the fonts we care about.

What fonts would this be? The UX spec expects form elements to have a font size of 13px. It seems to me that this is irrespective of the actual font chosen. Ideally, we could adjust the font size if:

  1. The font is used in a form control;
  2. The form control isn't CSS styled;
  3. The form control does not have a custom font size specified.

I am not sure if we can currently achieve this. If this isn't possible, we might have to consider leaving the default font size alone. This would be a question for UX at that point...

Flags: needinfo?(emilio)

These are the fonts used in form controls: https://searchfox.org/mozilla-central/search?q=font%3A&path=forms.css&case=false&regexp=false

-moz-fixed is just monospace, which also defaults to 13px if not overridden, so that's fine. So it seems just reducing the size of the -moz-field, -moz-button and -moz-list fonts is what you want, isn't it?

Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)

These are the fonts used in form controls: https://searchfox.org/mozilla-central/search?q=font%3A&path=forms.css&case=false&regexp=false

-moz-fixed is just monospace, which also defaults to 13px if not overridden, so that's fine. So it seems just reducing the size of the -moz-field, -moz-button and -moz-list fonts is what you want, isn't it?

Right, I'm not clear on how to achieve this though. As far as I know, we can't adjust the size in forms.css without impacting native themes too and I believe that when we compute system fonts in nsLayoutUtils, it is irrespective of where the font is used. Where do you suggest we adjust the font size?

Flags: needinfo?(emilio)

You have the font id in ComputeSystemFont, which should allow you to distinguish those fonts right?

https://searchfox.org/mozilla-central/rev/0c682c4f01442c3de0fa6cd286e9cadc8276b45f/layout/base/nsLayoutUtils.cpp#10359

Flags: needinfo?(emilio)

That is, I think you just need an extra condition in the current if.

Assignee: nobody → spohl.mozilla.bugs
Status: NEW → ASSIGNED
Pushed by spohl@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7068c52a19cb Only adjust default font sizes for buttons, lists and fields when non-native theming is enabled. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: