strength of extra-CSS style imperatives

Neil Galarneau writes:

 > In a CSS UA, what weight should be given to non-CSS style demands and can
 > those style requests be incorporated into the CSS style weighting system?
 > I know of at least 2 classes of non-CSS style demands:
 > 1) pre-CSS HTML style tags like <B> and <FONT>

'B' poses no problem as the sematics can be represented in CSS1:

  B { font-weight: bolder }

'FONT' is tougher since CSS1 has no way referring to attribute values
on elements. Here, the specification states:

  The UA may choose to honor other stylistic attributes (e.g. 'ALIGN')
  as if a 'STYLE' attribute had been used. When in conflict with other
  stylistic attributes, the 'STYLE' attribute should win.

I.e., browsers do what the want. If they honor the attribute (e.g.
FACE) it is given the weight of a STYLE attribute.

 > 2) JavaScript (and probably other scripts) document attributes
 >     fgColor
 >     bgColor
 >     linkColor
 >     alinkColor
 >     vlinkColor
 > So my question is: when CSS is present in a document with these
 > non-CSS style directives, how should we treat the non-CSS stuff?

The same rule applies here: browsers choose to honor or ignore them.

 > Maybe the non-CSS style directives could be turned into CSS rules
 > internally, given some low weight, and allowed to fight it out in the
 > CSS cascade.

Possible, yes. Where would you suggest to put them?



Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/people/howcome  howcome@w3.org