W3C home > Mailing lists > Public > www-style@w3.org > August 1998

Conversion of HTML attributes to CSS2 properties

From: David Perrell <davidp@earthlink.net>
Date: Wed, 5 Aug 1998 11:23:34 -0700
Message-ID: <004801bdc09e$28a4d9e0$15a8a8c0@dper>
To: "Style" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:55 GMT