W3C home > Mailing lists > Public > www-style@w3.org > August 1999

Re: When font-size and font size collide

From: Benjamin Schak <schak@schak.com>
Date: Tue, 17 Aug 1999 17:52:32 -0400 (EDT)
To: www-style@w3.org
Message-ID: <Pine.BSF.4.10.9908171731210.19105-100000@gnaaste.pair.com>
> Not when the HTML is:
> 
> <p><font>...</font></p>
> 
> and the relevant CSS rule matches the p element.
> 
> The rule to which you refer (CSS2 section 6.4.4, also in CSS1) only has
> an effect when the presentational hint and the CSS rule are on the same
> element.  Otherwise whichever is deeper in the document tree prevents
> inheritance from the one that is higher.  See [1], where I explained
> this fully.

You're right. Pursuant to 6.4.4, the agent should "generate" an
appropriate CSS rule for the "size" attribute of the <font> element and
place it at the style sheet's beginning with specificity 0 (something like
#generated0 { font-size: 18pt }, or whatever BASEFONT+2 is). However, even
though it only has specificity 0, it cascades over the <p> element's
"font-size." The only reason the <p> element's "font-size" would ever
"shine through" to child elements, so to speak, is that the default
"font-size" is "inherit." Here, though, the <font> element has something
besides "inherit" specified.

Benjamin Schak
benjamin@schak.com
http://www.schak.com/
Received on Tuesday, 17 August 1999 17:52:36 GMT

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