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

Re: CSS 2.1 WD and non-CSS presentational hints

From: Coises <Randy@Coises.com>
Date: Tue, 13 Aug 2002 02:55:25 -0700
To: www-style@w3.org
Message-ID: <6ughlu4n117q75ia64m4jkr5n3meq91l32@4ax.com>

[Tue, 13 Aug 2002 09:50:29 +0200] Håkon Wium Lie:
>To praphrase, you're saying it is a mistake to downgrade the weight of
>presentational hints from "the start of the author style sheet" (which
>CSS2 specifies) to be equal to the "user agent's default style sheet"
>(which is used in CSS 2.1 and CSS 3)?

That is exactly what I'm saying, for three reasons:
     1. It makes user style sheets behave illogically.
     2. It makes it impossible to use user style sheets to set
        presentational defaults.
     3. At least one very common browser (Internet Explorer, 5 and 6 for
        Windows) implements the current (CSS 2) specification properly.


>We changed this since we don't want to encourage the use of
>presentational hints. It has been a goal of CSS to eradicate the use
>of presentational attributes, and lowering their influence seems a
>logical way of achieving this goal. 

I disagree.

The CSS 2 specification creates a model consisting of four main layers:
     1. !important user style rules
     2. document specifications
           2a. !important author style rules
           2b. ordinary author style rules
           2c. presentational attributes
     3. ordinary user style rules
     4. user agent default style rules

A  sensible property of this model is that all the document specifications
are adjacent in priority: *how* presentation is specified in the document
can have no effect on the interpretation of anything outside the document,
only on the relative weight of one document specification against another.

The proposed change breaks this model, and makes it work this way:
     1. !important user style rules
     2. document style specifications
           2a. !important author style rules
           2b. ordinary author style rules
     3. ordinary user style rules
     4. document presentational attributes
     5. user agent default style rules

In the absence of a user style sheet, there is no difference.  The proposed
change doesn't change the interpretation of presentational attributes, it
changes the interpretation of the user style sheet: and it does so in a
thoroughly illogical way.  It would mean that the effect of a user style
sheet would depend on *how* presentation is specified in the document.
I see no reason that a user (that is who user style sheets are for, right?)
should need to know or care whether an author used HTML 4.01 presentational
attributes or a CSS style sheet to achieve a particular effect.


If you want to "eradicate the use of presentational attributes" (something
that will never be accomplished for legacy pages --- people won't re-write
them just because the "politically correct" way to code has changed) then
you must provide authors with a compellingly easier and more effective way
to accomplish their tasks.  That will do it (in time); nothing else will.


> > This change might also present difficulties for user agents which could
> > otherwise implement user-selected presentational defaults as a (real or
> > virtual) user style sheet; it would instead be necessary to modify the
> > (real or virtual) user agent default style sheet to set these defaults.
>
>I didn't understand this argument. Could you expand?

There are two steps to this, so I'm not sure which I've left unclear.

1. The proposed change would make it impossible to use user style sheets
to set *defaults* for presentation, because the user style sheet would
override explicit document specifications using (legacy) presentational
attributes.  There would be no way, for example, to specify in a user style
sheet that visited links should be maroon *if* the page doesn't specify a
color for visited links, because the user style sheet would override the
VISITED attribute of the BODY tag.  A perfectly reasonable page using:
     <BODY BGCOLOR=MAROON TEXT=WHITE LINK=YELLOW VISITED=SILVER>
would be rendered in an entirely unexpected way.  There must be hundreds of
thousands of such pages in existence; thus, user style sheets would be
rendered useless for establishing presentational defaults.

(Granted, they are already useless for this purpose in Opera; but that is
because of a bug which has been present, as far as I can tell, since the
first version of Opera which supported CSS.  Opera does not implement any
existing or proposed standard with regard to the cascade: Opera treats user
style sheets as if they were the earliest imported author style sheets.
Those who have access may see bug #14351.)


2. Many (though not all) of the "presentational variables" in a browser can
be expressed in terms of CSS.  (Examples of things which can be expressed
in CSS are the default color of text, the default presentation of
unvisited, visited and hovering links and the default font used for PRE
elements; examples of things which cannot be expressed in CSS are the
specific fonts to be used for the CSS generic font families, the actual
value corresponding to "font-size: small" and the color of the canvas.)  It
was actually you, Håkon, who once suggested (on another mailing list) that
it would be desirable if Opera could express as many as possible of the
user-controllable presentational variables as user style sheets.
Customization of presentation in the browser would then be largely
encapsulated by user style sheet handling --- the number of "special"
variables to be implemented piecemeal would be limited to those which could
not be expressed in CSS.  I thought this was a good idea --- but it would
be complicated by this change, since (as demonstrated in point 1) many
defaults could no longer be expressed in a user style sheet.  It would be
necessary to provide a separate "hook" into the user agent default style
sheet to implement presentational defaults, thus making a much "messier"
model than one which simply expresses user choices as a user style sheet.
-- 
Randall Joseph Fellmy aka Randy@Coises.com
Received on Tuesday, 13 August 2002 05:55:57 GMT

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