W3C home > Mailing lists > Public > www-style@w3.org > April 2018

Re: Default font-size of several form controls: 13.3333px in Chrome; 21.3333px in Firefox

From: Felix Miata <mrmazda@earthlink.net>
Date: Wed, 18 Apr 2018 17:50:16 -0400
To: www-style@w3.org
Message-ID: <7e8419f9-406d-f097-1b48-337da52e0597@earthlink.net>
GĂ©rard Talbot composed on 2018-04-18 16:05 (UTC-0400):

> Firefox 52.7.3 and Firefox 61.0a1 (today's nightly build)

> input {
> (...)
> 	font: -moz-field;
> (...)
> }

> coming from resource://gre-resources/forms.css

> and computes to 21.3333px

What size font is used in your starter and desktop menus and other DE UI? Which
Linux DE are you using? -moz-field is one of the old CSS fonts to inherit from
the system.
http://fm.no-ip.com/Auth/Font/fonts-mozf.html andor
http://fm.no-ip.com/Auth/Font/fonts-system.html last modified before CSS
redefined pt to mean px might be of some use here.

> textarea {
> (...)
> font: medium -moz-fixed;
> (...)
> }
> coming from resource://gre-resources/forms.css

> and computes to 12px

-moz-fixed is Gecko's and Quantum/Servo's way of specifying the user pref
setting for monospace, which on *nix builds ships at 12px, which for an inane
historical reason having to do with the anachronism that is 75 dpi bitmapped
fonts from two+ decades ago, are 1px smaller than Windows' and Mac's 13px
monospace default.

> select {
> (...)
> 	font: -moz-list;
> (...)
> }

> coming from resource://gre-resources/forms.css

> and computes to 21.3333px

Same size as -moz-field

> button,
> input[type="reset"],
> input[type="button"],
> input[type="submit"] {
> (...)
>    font: -moz-button;
> (...)
> }
> coming from resource://gre-resources/forms.css

> and computes to 21.3333px

Same size as -moz-field

> Why is there so much difference with regards to default font size of 
> several form controls between Firefox and Chrome?

> Why not use and rely on user's preferred font size instead? ... which is 
> what I would expect. If my preferred font size as set in browser 
> preferences is 16px (or 17px or 18px), then I do not get 16px (or 17px 
> or 18px) in both browsers. 

CSS form control fonts were (still are?) intended to inherit fonts from the DE,
typically GTK for Linux even though the actual DE is not using Gnome or any of
its relatives, e.g. KDE, TDE or anything QT-based.

Linux menu fonts long ago were typically 10pt (13.33px), but most DEs shrunk
them to 9pt to more closely resemble the 8pt scribble of Windows UI fonts,
ostensibly to benefit most people migrating from Windows to Linux. Your 21.333
may be coming from a GTK3 config file, or absence thereof, or a desktop DPI
setting. What is your output from 'xrdb -query | grep dpi'? That will report the
value of Xft.dpi, which is used as a DE zoom knob in Gnome and some other DEs,
and a DPI override in some other DE's personal settings (e.g. again, KDE and TDE).
-- 
"Wisdom is supreme; therefore get wisdom. Whatever else you
get, get wisdom." Proverbs 4:7 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
Received on Wednesday, 18 April 2018 21:50:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 18 April 2018 21:50:42 UTC