Re: Inconsistent treatment of "em" and "ex" unit when used to specify "font-size"

Bert Bos wrote:

>> On Mon, Oct 26, 2009 at 9:59 AM, Philip TAYLOR<>

>>> Is there any reason why "ex" does not also reference
>>> the parent element's font size if set on the 'font-size'
>>> property, as if "ex" units are used to specify font-size,
>>> there would appear to be a problem of self-reference
>>> (see example below).
> The working group decided that this was an oversight and the ex
> definition will be changed to say the same as the em definition. We
> didn't check all implementations, but those we checked already do it
> this way. (Indeed, it would be hard to imagine how else it could work.)

Thank you for the confirmation, Bert.  It was certainly
the case in the past that browsers treated "ex" inconsistently,
as a result of which we [1] ceased using them, relying instead
(and with far greater success) on the use of "em" units
even in a vertical context where "ex"s would have been
preferable.  However, I am quite willing to believe that
the current generation of browsers now treat "ex" units

> On that last sentence of the quoted text (which is marked as an issue in
> the working draft): The WG currently believes that the text of CSS 2.1
> ("In the cases where it is impossible or impractical to determine the
> x-height, a value of 0.5em should be used.") is still the best and can
> be inserted unchanged at that point in the CSS3 module.

I am a little unhappy with "or impractical"; does this not
leave a rather large loophole for browser inconsistencies ?

Philip Taylor
[1] The Web team at Royal Holloway, University of London

Received on Friday, 30 October 2009 14:10:19 UTC