Re: [CSSWG] Resolutions 2007-08-28

On Wednesday 29 August 2007 11:12, Philip TAYLOR wrote:
> Bert Bos wrote:
>
> (snip (to be returned to later !)
>
> > I also think that changing the base font size (your example) is
> > something that designers should simply never do. The media queries
> > don't measure the distance of the user from his screen and thus
> > cannot say anything sensible about the optimal font size.
>
> But what about the standard typographic guidance,
> extended to the web screen, that a single line
> of text in a paragraph should not exceed approximately
> $nn$ characters (40 -- 70 for paper, 70 -- 100 for
> screen) ?  Beyond this, the reader is likely to
> lose context on re-scanning to the start of the
> next line.  This is the reasoning behind our "compute
> optimal font size" code.

I use 'max-width: 35em' for that.

And there is also going to be a direct way to set the font size based on 
the viewport size, without Media Queries (see the Values & Units 
WD[1]):

    font-size: 2.5vw

sets the font size to 2.5% of the width of the viewport. (I suspect 
users will find it very frustrating if designers use this often, but it 
is there if you need it.)

[1] http://www.w3.org/TR/2006/WD-css3-values-20060919/#relative0

Something related that we want in CSS, but haven't quite finished 
designing yet, is a way to make a given text exactly fill a given 
width. We have a proposed

    last-line-align: size

whose naming isn't as intuitive as we'd like but which means that the UA 
adjusts the font size so that the text of the block fits exactly on one 
line. Maybe 'text-align: justify; text-justify: size' is more 
intuitive. It's useful for certain headings, e.g. (A related 
addition, 'min-font-size' and 'max-font-size', allows to limit the 
damage.)

I've also heard a request once for a way to ensure that, whatever the 
width of the box, there are roughly 40 characters on a line. I'm not 
sure there are good use cases for this and with the addition of 'vw' 
and calc(), I think designers have ways to achieve this in sufficiently 
many cases.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Wednesday, 29 August 2007 14:31:42 UTC