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

On 27/06/2014 12:29 PM, Bruno Racineux wrote:
> 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.

That style for the h3 headers is overruling this style #ires h3, #res h3 
{font-size: medium;}.

>> 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.

Can you explain to me what text-zoom is?

> 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.

Is this the failure of text-only zoom or pixel perfect layouts?

> 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).

How could 'max-font-size' or 'min-font-size' prevent it? I presume you 
mean the layout integrity.

Have you see this setting in Chrome (it's hidden well). 
chrome://settings/fonts

> 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.

What happens when someone has a minimum font size setting? Not everyone 
relies on a default font-size. For me, it's 16px. A few months ago, 
Facebook brought in their new type layouts. To prevent the layout from 
falling to pieces, I had to reduced my minimum font size from 14px to 
12px. To counter this where I encountered mouse text, I loaded this into 
stylish.

.UFIList li {font-size: 120%;}
._4_7u .timelineUnitContainer {font-size: 150% !important}

.userContentWrapper .aboveUnitContentuser {font-size: 150% !important}

> 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.

Please may you provide a link to understand what text-zoom is since 
Google search doesn't help. https://www.google.com/?#q=text-zoom



-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/

Received on Friday, 27 June 2014 04:10:53 UTC