W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: Why not max/min-font-size? & extend them to other properties of sizes

From: Bruno Racineux <bruno@hexanet.net>
Date: Thu, 26 Jun 2014 19:29:57 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>, Gérard Talbot <www-style@gtalbot.org>
CC: Kseso? <kseso9@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <CFD1FEDE.896A6%bruno@hexanet.net>
On 6/17/14 10:44 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Mon, Jun 16, 2014 at 7:51 PM, Gérard Talbot <www-style@gtalbot.org>
>wrote:
>> Le 2014-06-16 19:09, Tab Atkins Jr. a écrit :
>>
>>> On Sat, Jun 14, 2014 at 6:02 AM, Kseso? <kseso9@gmail.com> wrote:
>>>>
>>>> I think you should consider the convenience of including the css
>>>> properties:
>>>> max-font-size
>>>> min-font-size
>>>> onto the "Css Font module" document.
>>>
>>>
>>> These seem easy and useful;
>>
>>
>> How does a web author know in advance the mininimum text size suitable
>>for
>> his audience?
>
>People usually complain about text being too *small*, not too large.

Used to. Now I sadly myself complain a lot about fonts being too big.
Starting with that horrid `h3 { font-size: 18px!important; }` on Google
Search. For starter, how dare does Google, of all people, blatantly
overrides a user's default font size? Hello Accessibility!? /aside.

>I don't see a problem here. This lets authors set a font-size in
>something useful but possibly variable, but ensure it doesn't get
>smaller than, say, 16px.

I very much like the idea.
It has its use for text-zoom where a larger font size can ruin a layout.

Case: When you use an arbitrary text-only zoom on desktop, all fonts can
get bigger, completely messing up with the layout integrity of
pixel-perfect logos, headers, menu etc.

Forcing a container's font with 'max-font-size' or 'min-font-size' could
prevent that from happening in such specific containers. Currently locking
the font in pixel is only possible for when a user changes the default
font size, but not on text-zoom (not available on Chrome for some reason).

For example, if I use 'body { font-size: 100% }' and all other fonts in
scalable percentages or ems, I can lock a specific container to a 16px
base even if the fonts in children elements are in %. So if the user has a
default font size of 18px, all my fonts scale upon the user default,
except for particular area deemed negatively affecting the layout.

For text-zoom, we are pretty much out of option, except for a painful
Javascript Solution rescaling fonts according to a detected text-zoom
scale.
Received on Friday, 27 June 2014 02:30:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC