Re: When font-size and font size collide

THis is one particilarly good use for the 'inherit' property value,
which lets you state:

font {font-size: inherit; color: inherit; font-family: inherit}

This disables all effects due to FONT by directly overriding the
attribute-specified behavior.

Only in Netscape 5, unfortunately.... and a pity it didn't make it into
IE5's renderer.


On Tue, 17 Aug 1999, Steve Mulder wrote:

> David, nice piece [1] on font size. You're absolutely right about what the
> spec says.
> After thinking about it, I'm not sure I agree that's how it should work. It
> forces authors to apply CSS to "style-based" HTML tags (like FONT SIZE)
> instead of to "structure-based" tags (like P), if they want the CSS
> font-size to override the HTML <FONT SIZE>.
> As an author, I'd want the browser to use the HTML *only* if no other CSS
> rule was relevant. The HTML is my "backup formatting" for older browsers,
> and nothing more. Thus, *this* author would rather it worked differently
> than it does. (But given current browser support, I know there's really no
> point arguing for it now...)
> steve
> At 4:20 PM -0400 8/17/99, L. David Baron wrote:
> >On Tue, 17 Aug 1999 16:04:29 -0400, Steve Mulder (
> >wrote:
> >> Yup, that would be a lovely little browser bug.
> >>
> >> According to the spec, HTML stylings (like FONT SIZE) should be treated
> >> with less specificity than all CSS rules. Thus, the CSS *should* override
> >> the HTML.
> >
> >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.
> >
> >However, I *think* <font size="+2"> is often treated as relative to the
> >base font size of the document, not the font size of the parent
> >element.  That might explain the problem.
> >
> >David
> >
> >[1][ST_rn=ps]/getdoc.xp?AN=443308087 , also at
> >
> >
> >L. David Baron     Rising Sophomore, Harvard
> >Links, SatPix, CSS, etc.        < >
> >Summer Intern, Netscape - however, opinions are entirely my own, etc.

Received on Tuesday, 17 August 1999 18:12:59 UTC