the *precise* definition of 1em


 > What if I write something like this:
 > BODY { font: numbers, someotherfont; font-size: 11pt }

Slightly off topic: 'font' requires a size value as well as one (or
more) font family values -- you should use 'font-family':

   BODY { font-family: numbers, someotherfont; font-size: 11pt }

 > Now, assume that numbers is a font that contains glyphs only for the ten
 > digits, and someotherfont contains all the glyphs.  Furthurmore, assume
 > that we don't have 11 point versions of either font, so we end up using
 > a 10 point version of numbers and a 12 point version of someotherfont.


 > Now, the CSS1 spec does state that if we can't accomodate the exact
 > value, we should approximate, and use the approximated value.  But
 > in this example, it's hard to know which of the two fonts to use.

Whenever 'numbers' contain the glyph you are looking for, it should be
used. Othewise 'someotherfont' should be used. This way, you may end
up using both fonts in the same element. This raises an issue: which
of the values should be inherited? [1] specifies that it is the
approximated value that should be inherited, but does not specify what
happens when there are more than one approximated value. Suggestions?

[1] http://www.w3.org/TR/REC-CSS1-961217#length-units

 > but to make sure that writing font-size: 1em will be a no-op, I guess
 > we have to use 11pt, thus *not* approximating.  (It's also much easier
 > for me to implement it that way :)

I don't quite understand what you mean here. The UA may have to
approximate even if '11pt' is specified. If '1em' is specified, it is
relative (1em=100%) to the font size of the parent element (HTML). If
no rules apply to the 'HTML' elment's font size, the initial
('medium') value will be used. What 'medium' resolves to is UA

[2] http://www.w3.org/TR/REC-CSS1-961217#font-size



H      k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria # FRANCE http://www.w3.org/people/howcome

Follow-Ups: References: