Stephen Poley <sbpoleySpicedHamTrap@xs4all.nl> wrote:
> If you check the CSS spec section 6.4.4, you'll see that there is
> provision for allowing CSS to override FONT elements etc.
The way I see it, it says that CSS enabled browsers _must_ honor (in the
usual sense - there might be overriding rules in user style sheets, etc.)
CSS rules if they apply to FONT elements. But contrary to what people
seem to think fairly often, just setting font properties for the body
element for example won't do that. You need to use selectors that match
the font element (such as font, the name of the element, or *, the
universal selector) itself.
font { font-family: inherit;
font-size: inherit;
color: inherit;
font-weight: inherit; }
_should_ nullify the effect of font tags, by the specification. (The last
declaration is mostly theoretic: it nullifies the proprietary font-weight
attribute recognized by Netscape 4 [only, I think].)
> However in
> previous discussions I think it has been said that browsers are not
> very reliable in this area.
The main problem is that the value inherit is poorly supported, counting
by popularity of browsers. On Mozilla the above works fine, on IE not at
all. And there is in general no workaround - the value inherit has just
the meaning we want here, and there is no general substitute. For
the font size, however, we can use font-size: 100%. We could set
font-weight: normal, but that's not the same as inherit. More
importantly, we can set color: black but it then naturally makes the
color black even if the page's overall text color is different (e.g. due
to browser settings). And for font-family, what could we do?
> Faced with unpredictable versions of tag
> soup, I think you'd be better off fixing the problem (i.e. the CMS)
> rather than trying to patch over the symptoms.
Indeed. And allowing arbitrary tags (including browser-specific
monstrosities) creates unpredictable problems. So the positive approach
of permitted some repertoire of markup and throwing away the rest is
best.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
|