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

RE: New WD: CSS3 selectors

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Mon, 9 Aug 1999 02:30:09 -0400
To: <www-style@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBEELPCNAA.jelks@jelks.nu>
Thank you, Bert, for the very in-depth response.

> But if ".class" is an abstract concept, it needs to be bound to
> something concrete, via some specific syntax. There are several
> possibilities:
>
> 1. In the XML document itself:
>
>    [ namespaces, predefined XML attributes, PI suggestions snipped ]
>
> 2. In the CSS style sheet:
>
>    a. Scoped to one CSS file: Something like this near the top of the
>       file: @class "attributename";
>
>    b. Scoped to an XML namespace:
>       @namespace html url(http://www.w3.org/xhtml1-strict) class="class";
>
>    c. Explicitly scoped: @class "attributename" {... rules... }
>
> 3. Always bind it to an attribute called "class." If there isn't any:
>    bad luck.
>
> My current opinion: I think (1) looks ugly

I couldn't agree more ... :)

> and (3) is too limited.
> (2a) has my preference, but it may mean you have to split a style
> sheet into several files if your document mixes namespaces. (2b) is
> more complex, but doesn't have that disadvantage. I don't like (2c),
> because it introduces an extra level of nesting, which will scare too
> many potential CSS authors.

I'm pretty much with you here, with the following caveat.  #3 (the literal
attribute "class") may be limited, but I think it will be widely used -- out of
habit if nothing else (IE5 does it).  Perhaps it should default to that, unless
#2 (@class "attributename" or its namespace equivalent) overrides it.

> We probably have to look at the problems of class, ID and embedded
> styles together: we have a problem with #id selectors, since you may
> not always know which attribute is the ID.
> And embedded styles (style attribute) are occasionally convenient as well.

I assume you mean _inline_. Yes, it's the same problem: use the "hard coded"
attribute "style", or employ a mechanism like @style "attributename"; (or, in
the case of ID, @id "attributename"), or both?

Speaking of embedded, I assume there's no plan of using "embedding" (as we can
do with HTML docs) CSS inside XML docs? ...  I am interested in the mechanism(s)
hinted at in http://www.w3.org/TR/xml-stylesheet/ (see last paragraph) -- has
there been discussion of some kind of "wrapper" file containing pointers to the
markup URLs, the style sheet(s), script(s) (if any), etc.?   Then have browsers
reference the wrapper instead of the markup directly -- that way, your markup is
kept clean of stylesheet PIs, scripts, etc., and can be reused in other contexts
...

/Jelks
Received on Monday, 9 August 1999 02:33:46 GMT

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