Conversion of HTML attributes to CSS2 properties

Section 6.4.4 describes translation and precedence of non-CSS presentational
hints, and an exception to the specificity rules:

"The UA may choose to honor presentational hints from other sources than
style sheets, for example the FONT element or the "align" attribute in HTML.
If so, the non-CSS presentational hints must be translated to the
corresponding CSS rules with specificity equal to zero. The rules are
assumed to be at the start of the author style sheet and may be overridden
by subsequent style sheet rules."

Is it correct to call the FONT *element* a presentational hint? Does a
*rule* have specificity? Can a type selector for a specific element have a
specificity of zero?

Specificity is a descriptive term, and it doesn't seem logical that an
element type selector be given a specificity of zero. As noted, this change
from CSS1 was made to accommodate the universal selector "*", for which
specificity of zero *does* make sense.

Rather than break the logic of specificity, why not consider rules
translated from HTML presentational attributes to be in a virtual stylesheet
with a sort-order between user and author stylesheets?

Hypothetical paragraph describing virtual stylesheet:

"The UA may choose to honor presentational hints from other sources than
style sheets, for example the "color", "face" or "align" attributes in HTML.
If so, the non-CSS presentational hints must be translated to the
corresponding CSS declarations and applied to type selector(s) for the
relevant element(s) to form CSS rules. The rules are then considered to be
in an intermediate stylesheet between the user and author stylesheets. In
accordance with section 6.4.3, all will have a specificity of 1."

David Perrell

Received on Wednesday, 5 August 1998 14:23:31 UTC