W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: Request for adjustable font-size: line-fit

From: Richard Fink <rfink@readableweb.com>
Date: Tue, 20 Aug 2013 09:52:13 -0400
Message-ID: <5213748D.1040202@readableweb.com>
To: Lea Verou <lea@verou.me>
CC: Anselm Hannemann <info@anselm-hannemann.com>, "www-style@w3.org List" <www-style@w3.org>
On 8/20/2013 8:32 AM, Lea Verou wrote:
> What happens when the line width depends on the font-size, such as 
> when width is specified in ems, ch or ex?
>
> – Lea Verou • lea.verou.me <http://lea.verou.me> • @leaverou 
> <http://twitter.com/LeaVerou>
I would suppose that, based on the em value initially specified in the 
style sheet, the browser would compute a line size corresponding to 
that, and so that would become the boundaries of the box, so to speak.

Regards,

rich

>
> On Aug 19, 2013, at 10:23, Anselm Hannemann <info@anselm-hannemann.com 
> <mailto:info@anselm-hannemann.com>> wrote:
>
>> Hi,
>>
>> I wonder if it makes sense and would be possible to implement a 
>> technique that
>> adjusts the font-size to fit into an element's line-width.
>>
>> This jQuery plugin covers the use-case: 
>> http://www.zachleat.com/web/bigtext-makes-text-big/
>> Unfortunately it is bound to jQuery and also causes massive repaints 
>> in browsers.
>>
>> This is why I think it should be done natively within CSS like:
>>
>> font-size: line-fit;
>>
>> Therefore we would need also the following sub-attributes to control 
>> (min | max) of the font-size:
>>
>> min-font-size: 1em;
>> max-font-size: 3em;
>>
>> I already found some indicators that this topic has already been 
>> raised some time ago but didn't find
>> any accurate or clarifying information about it [1] [2].
>>
>> [1] http://lists.w3.org/Archives/Public/www-style/1999Mar/0086.html
>> [2] 
>> http://my.safaribooksonline.com/book/web-development/css/0130092789/text-properties/ch10lev1sec12
>>
>> If you have any hint or opinion on the topic (either way) I would be 
>> happy to know about it.
>>
>> Cheers,
>> *Anselm | Anselm Hannemann | @helloanselm | helloanselm.com 
>> <http://helloanselm.com/>
>
Received on Tuesday, 20 August 2013 13:52:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC