- From: Anselm Hannemann <info@anselm-hannemann.com>
- Date: Tue, 20 Aug 2013 21:27:14 +0200
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Lea Verou <lea@verou.me>, "www-style@w3.org List" <www-style@w3.org>
On 20.08.2013, at 16:16, Brad Kemper <brad.kemper@gmail.com> wrote: > 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. This being true I don't think it is proper to do this via text-overflow. Overflow only describes what happens if the text is longer than the parent element. This request is about what happens to fit the line (usually this means upscaling the font to parent element's width). As a developer I would find it very awkward to find a `font-size` controlling value in `text-overflow`. -Anselm
Received on Tuesday, 20 August 2013 19:27:39 UTC