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

Re: CSS 2.1 WD and non-CSS presentational hints

From: Coises <Randy@Coises.com>
Date: Fri, 13 Sep 2002 22:54:41 -0700
To: www-style@w3.org
Message-ID: <r0i5ou0kfss71rvfb7qhpqok153u0dlmvl@4ax.com>

[Sat, 31 Aug 2002 18:01:39 +0000 (GMT)] Ian Hickson:
>On Thu, 29 Aug 2002, Coises wrote:
>> CSS is not concerned with the "semantics" of the document language: only
>> its form.  It's seems to me illogical that CSS would treat <B> and <STRONG>
>> differently.  CSS doesn't care that <B> is presentational and <STRONG> is
>> purposeful.  On the other hand, <CENTER> and <DIV ALIGN="CENTER"> ---
>> though *HTML* may consider them equivalent --- appear completely different
>> to CSS.
>No they don't.
>   B { font-weight: bold; }
>   STRONG { font-weight: bold; }
>   CENTER { text-align: center; }
>   DIV[ALIGN=CENTER] { text-align: center; }
>They seem the same to me.

If I recall correctly, some recent and rather popular browsers don't
support attribute selectors --- that would make the last of your rules
rather problematic.

If you're arguing that B and STRONG should be treated differently... then
you're apparently claiming that it should make sense to a user, writing a
user style sheet, that:
     STRONG {font-weight: normal;}
works  --- unless the author has defined STRONG in a style sheet, in which
case the author's definition is respected --- but:
     B {font-weight: normal;}
has no effect (unless !important is added, in which case author
specifications are ignored too).

I think the simple fact that their formal syntax is parallel is much more
compelling than relatively arcane considerations of whether they are
"semantic" or "presentational" tags in the document language.

On the other hand, if you're arguing that CENTER and DIV[ALIGN=CENTER]
should be treated the same... then you're either saying that:
     CENTER {text-align: left}
should fail (like the B rule above, only an !important declaration could
have any effect), or that:
     DIV {text-align: justify}
should not just set the *default* for DIVs, but force every DIV (even those
that specify an ALIGN attribute) to be justified --- unless the author used
CSS instead of HTML to specify the text-align.

If I want *every* DIV (regardless of what alignment the author specified,
and how the author specified it) to be justified, I'd write:
     DIV {text-align: justify !important}
whereas if I wanted merely to override the user agent style sheet default
for DIV alignment (but still honor author specifications when they're
given) I'd expect to write:
     DIV {text-align: justify}
(as I can in most current CSS 2 implementations).  But I'd be surprised if
I had to write:
     CENTER {text-align: left !important}
to get a result, just because I'm supposed to remember which of these very
similar-looking things are "presentational" and which are "semantic."  I
repeat that it doesn't seem to me that CSS is --- or should be ---
concerned with the semantics of the document language.

Why in the world I'd want to override the author's suggestion if it was
made in HTML, but not if it was made in CSS (as the CSS 2.1 proposal would
have it) I can't imagine at all.

>Since this is all UA stylesheet stuff, we can even posit UA extensions to
>CSS, such as:
>   FONT[color] { color: -ua-attr(color, color); }
>   FONT[size] { font-size: -ua-attr(size, html-font-size); }
>Why is this any different the B and CENTER rules above?

Because they can't be included (and hence, in practice, made subject to
controlled override) in a user style sheet.  And it's user style sheets ---
*and*nothing*else* --- that are affected by this whole matter.
Randall Joseph Fellmy aka Randy@Coises.com
Received on Saturday, 14 September 2002 01:55:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:03 UTC