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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 20 Aug 2013 07:16:20 -0700
Message-Id: <B519865F-C833-4F57-9BE7-B2B697DB1C70@gmail.com>
Cc: Lea Verou <lea@verou.me>, "www-style@w3.org List" <www-style@w3.org>
To: Anselm Hannemann <info@anselm-hannemann.com>
On Aug 20, 2013, at 6:29 AM, Anselm Hannemann <info@anselm-hannemann.com> wrote:

> Can you think of a how this can be solved the easiest way for a browser 
> (I'm personally missing some background information to know how they calculate their styles 
> and can get styles from parent / root in such cases).

It seems to me we already have a property for dealing with single lines of text that don't fit. It is not 'font-size', it is 'text-overflow'. Therefore, I think what you are trying to achieve would work better as 'text-overflow: fit'. If the text can't fit on one line, can't wrap to a second line, and can't overflow visibly or into a scrollable space, then it shrinks the used font size until it does fit. It should also shrink the value of 1em, so that descendants on that line with properties measured in ems would continue to be proportional.  

You might still want some minimum-font-size too.
Received on Tuesday, 20 August 2013 14:16:50 UTC

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