Re: font sizes...

Mary Morris writes:
 > > I now have a question.  Literal values were ment to be taken as a
 > > relative font size in one of the 7 HTML font sizes.  My question is, if
 > > the size is already 7 (xx-large) does a "font-size: +1" generate an
 > > HTML font size of 8? (8 being aprox 150% larger than 7)
 > 
 > Dumb question time here. To my knowledge, only Netscape used the 1-7
 > numbers to correspond to sizing for fonts. I don't remember it being
 > seen in specs. Is this really true? 

The CSS1 spec gives four ways to set the font size:

1. Corresponding to Netscape's numbering scheme is the set of 7
keywords: xx-small, x-small, small, medium, large, x-large and
xx-large.

2. Steps up and down this ladder can be made with numbers: positive
numbers step up, negative numbers step down. It is allowed to go
outside the range of seven, though there may be application dependent
restrictions. (Note that +1 and 1 mean the same thing.)

3. An absolute length can be given as a number followed by a unit:
7pt, 0.5in, 14px, etc.

4. Relative sizes can be specified as percentages, which are relative
to the parent element's font size: 80%, 200%.

 > I do agree that the relative numbers were meant to be 150% of the
 > previous value, I'm just confused about the number base.
 > 
 > As for MSIE's implementation, could you live with 
 > font-size: +1pt 	for relative to point size and

Problem with this is that it +1pt indistinguishable from 1pt, unless
the +-sign is given a special role.

 > font-size: +1 		for 150% larger?
 > 
 > If so, should we send this off to MSIE (assuming they aren't listening
 > anyway).
 > 
 > Regardless of how we do this, there are going to be a lot of confused
 > people who aren't sure what is absolute and what is relative and what
 > they are relative to unless something is fairly explicit. I had thought
 > that this was a moot point until I read back over the spec.

To help with this confusion, we are in the process of adding two
keywords: bigger (equiv. to 1) and smaller (equiv. to -1). Points 1
and 2 above could than all be done with keywords.


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/pub/WWW/People/Bos/                      INRIA/W3C
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 93 65 77 71                 06902 Sophia Antipolis Cedex, France

Received on Tuesday, 23 July 1996 11:06:03 UTC