Re: CSS 2.1 WD and non-CSS presentational hints

[Tue, 13 Aug 2002 09:22:17 -0400] L. David Baron:
>The problem with the rule stated in CSS2 is that the difference between
>presentational hints and things that go in the UA stylesheet is not
>clear.  For example, is the B element in HTML a presentational hint, or
>is it something that should be styled in the UA stylesheet by a rule
>
>B { font-weight: bold; }

We can take a pretty good hint from "A sample style sheet for HTML 4.0"
(Appendix A, <http://www.w3.org/TR/REC-CSS2/sample.html>).  We see entries
like:

     H1, H2, H3, H4, H5, H6, B, STRONG  { font-weight: bolder }
     I, CITE, EM, VAR, ADDRESS  { font-style: italic }

but we don't see anything like:

     FONT[FACE]  { font-family: attr(FACE) }

(which is not surprising, since no such syntax exists in CSS 2).

In HTML and its descendants, "presentational hints" means
"attributes the purpose of which is to suggest presentation."

At least, I don't see any other plausible, consistent interpretation.


There is a good reason for this distinction.  When an *element* implies
presentation, it is easy to control the way it is handled in a style sheet:
one needs only a simple selector to reference it, and the standard
presentation is fixed.  If one wishes to write a user style sheet that
forces all elements to normal weight *except* for B and STRONG, it's easy:
     * {font-weight: normal}
     B, STRONG {font-weight: bold}

But referencing an attribute with an arbitrary value is generally not
possible in CSS 2/2.1.  How would you accomplish this (invalid syntax):
     BODY {color: navy}
     BODY[TEXT]  {color: attr(TEXT)}
in CSS 2.1?  As far as I can tell, there is no way to do such a thing,
except by relying on the cascade to cause <BODY TEXT=...> to overrule the
(first, valid) user style sheet rule --- which is exactly what I'm
complaining would no longer be possible given the proposed change.
-- 
Randall Joseph Fellmy aka Randy@Coises.com

Received on Tuesday, 13 August 2002 20:09:23 UTC