Re: When font-size and font size collide

> 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

Received on Tuesday, 17 August 1999 17:52:36 UTC