Re: Effects of Mixing CSS anf <FONT> tag?

On 10 Apr 97 at 14:44, Patrick Nepper wrote:

> On Thu, 10 Apr 1997 05:08:22 +0000  Robert Rothenburg wrote:
> 
> >Again... The use of CSS definitions for <DT> and <DD> override the
> ><FONT> tag on MSIE... is this standard, or just how MSIE handles it? 
> >(How do other browsers handle it...?)

A browser should override the <FONT> tag if there are 
non-inherited conflicting rules (i.e., font-size, font-family, or 
color in CSS1) in the author style sheet.

From what I've noticed with MSIE3, it seems to override <FONT> with 
inherited CSS styles.  For example, setting BODY { color: black } 
will override all <FONT COLOR> tags, even with something like 
<P><FONT COLOR=red>Foo</FONT></P>.  <FONT> should override 
inherited rules according to the CSS1 Recommendation 
(http://www.w3.org/pub/WWW/TR/REC-CSS1), as I interpret section 3.2.

> As far as I understand stylesheets, I think they are supposed to provide
> basic style-guidelines that are used instead of stylesheets that are implemented
> into UAs.
> 
> Before the CSS1 spec <FONT>-tags overrode stylesheets given by UAs.
> In analogy to this I would propose that now the <FONT>-tag overrides those stylesheets 
> defined by the author (when present).

The CSS1 Recommendation states:

----
The UA may choose to honor other stylistic HTML attributes, for
example 'ALIGN'. If so, these attributes are translated to the
corresponding CSS rules with specificity equal to 1. The rules are
assumed to be at the start of the author style sheet and may be
overridden by subsequent style sheet rules. In a transition phase,
this policy will make it easier for stylistic attributes to coexist
with style sheets.
----

So, for example, <FONT SIZE="+1"> would be translated to <SPAN 
STYLE="font-size: larger"> and <FONT COLOR=red> would be translated 
to <SPAN STYLE="color: red">.  However, the above quotation states 
that the specificity would be 1, even though the STYLE attribute 
would normally give specificity of 100.

With such a low specificity (see the table at 
<http://www.w3.org/pub/WWW/TR/REC-CSS1#cascading-order>), and 
with the translated styles assumed to be at the start of the 
author style sheet, <FONT> and friends would always be overridden by 
non-inherited conflicting CSS rules in the author style sheet.

Liam Quinn
===============  http://www.htmlhelp.com/%7Eliam/  ===============
Web Design Group            Enhanced Designs, Web Site Development
http://www.htmlhelp.com/    http://enhanced-designs.com/

Received on Thursday, 10 April 1997 15:38:36 UTC