W3C home > Mailing lists > Public > www-style@w3.org > June 2005

Re: Initial Value

From: Felix Miata <mrmazda@ij.net>
Date: Tue, 31 May 2005 23:49:53 -0400
Message-ID: <429D3061.34D8@ij.net>
To: www-style@w3.org

Boris Zbarsky wrote:
 
> Felix Miata wrote:

> > OK, so still from
> > http://www.w3.org/TR/CSS21/fonts.html#propdef-font-size the result of
> > the reset to initial value is font-size: medium.
 
> Yes.
 
> >>   font-size: 70%;
 
> >>Note that this is all happening while the _specified_ value is being determined.
> >>  There is no inheritance involved yet; the resulting specified value of
> >>"font-size" is 70%.  This leads to a computed value of "11.2px" in your case,
> >>since the computed value of font-size is an absolute length.

> > 70% (specified via font) of 20px (per the testcase, the actual UA
> > default setting reset by font to medium)
 
> No.  Again, all the "font" shorthand in question does to the "font-size" is
> effectively specify:
 
>    font-size: medium;
>    font-size: 70%;

>From the 15.8 language, that means to me first make medium, then apply
70% to the computed value of medium, in the same fashion that {font:
menu; font-size: 130%;} would be computed.
 
> When converting the 70% to an absolute length, the "percentages" section in the
> description of the font-size property is applied.  I don't see where you're
> insisting on pulling the "UA default setting" out of here... 

"All font-related properties are first reset to their initial values"
takes "medium" from the UA.

> it doesn't matter
> what the UA default setting is; only what the computed font-size of the parent
> of the node in question is.

The absolute-size, the first possible value defined in the spec for
font-size, "medium" is not subject to inheritance from any ancestor but
the UA, so the size that otherwise would be inherited (from the
percentages section of the font-size spec) must be disregarded. Then
70%, the explicit setting in the rule must be applied to medium,
resulting in 14px as the final computed value for p.two.

How can the actual existing language in the 2.1 spec not allow this
alternate interpretation to the one obviously being used by Gecko? If
the latter interpretation is intended to be the only possible
interpretation, then it needs better language. It shouldn't say "...
reset ... then...". It should say reset only those values not explicit
in the rule. The way the language reads now, .two is easily interpreted
to mean reset to medium first, then apply 70% to medium.
-- 
"Through Him all things were made; without Him nothing was made
that has been made."                                John 1:3 NIV

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://members.ij.net/mrmazda/auth/
Received on Wednesday, 1 June 2005 03:50:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:37 GMT