W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css4-fonts] font-size: auto

From: Ian Moffitt <imoffitt@barkleyrei.com>
Date: Wed, 15 Feb 2012 08:35:28 -0500
Message-ID: <CA+1mqa_NirLEYB9HxccJA8FsxaL1bmE+Pm5qnE3zFnWoMs2HLg@mail.gmail.com>
To: Christoph Päper <christoph.paeper@crissov.de>
Cc: www-style list <www-style@w3.org>
I could see that as a being a huge boon to responsive design in the future,
where plain text can adjust based on the width of the parent container.

I wonder if this could also be assisted with a max- and min- property?
max-font-size and min-font-size? I know some fonts become unreadable at
certain sizes, and at that point it would be more appropriate to wrap it
than continue to shrink it.

Ian Moffitt
*Interface Programmer*
*2840 Liberty Ave, Suite 100
Pittsburgh, PA, 15222
Direct: 412.683.3700x283
Mobile: 412.841.4577


On Wed, Feb 15, 2012 at 6:43 AM, Christoph Päper <
christoph.paeper@crissov.de> wrote:

> Sometimes you have a one-line box (or maybe 2 lines of text) with a fixed
> width and the text within should fill all of this. This could be done with
> either manually adjusting letter-spacing and word-spacing or with manually
> increasing the font-size until just before the last word breaks to the next
> line. This, however, does not work reliably since you can never know which
> font will be used in the end. For letter and word spacing the automated
> variant is known as justified text, i.e. “text-align: justify”, but for
> font sizing there is none.
> Therefore I would like to suggest for level 4 of the Font module to make
> the ‘font-size’ property accept at least one new keyword, e.g. ‘auto’,
> ‘line-fill’, ‘width’ or ‘fill-x’, that facilitates the described behavior.
> I’m not sure there are also valid usecases for
> a) shrinking the size until the complete text fits within one line,
> b) increasing the size until the parent box’s height is used to the
> maximum extent by lines of text,
> so I’m leaving that to level 5 or others to propose. Beware, though, that
> if these are future things to address ‘auto’ may not be the best choice for
> the suggested line fill keyword.


NOTE: The information contained
in this e-mail message, including
any attachments, may be privileged
or confidential. Use or dissemination
of this message is prohibited by
anyone other than the intended
recipient. Although our computer
system is supposed to scan incoming
e-mail and any attachments for viruses
or other defects that might harm
computer systems, BARKLEY disclaims
any responsibility for any resulting loss
or damage.
Received on Wednesday, 15 February 2012 22:22:28 UTC

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