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

Re: New WD: CSS3 selectors

From: Chris Lilley <chris@w3.org>
Date: Mon, 09 Aug 1999 22:30:02 +0200
Message-ID: <37AF3A4A.602ACB8B@w3.org>
To: jelks@jelks.nu
CC: www-style@w3.org


Jelks Cabaniss wrote:
> Bert Bos wrote:


> > 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.

> > 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). 

So does Mozilla, for example XUL uses a class attribute. So, indeed,
does SVG.

Its one thing to say, we don't require XML DTDs to have an attribute
which is actually called class. But on the other hand, if an XML DTD
does choose to do so, then I don't see why that should be penalised.

Perhaps there should be a little css namespace with the class attribute
and the style attribute and style elements, something like that, so that
they can be used wherever people want in XML documents.

> Perhaps it should default to that, unless
> #2 (@class "attributename" or its namespace equivalent) overrides it.

I aqgree that the more complex, name remapping suggestions can be
valuable, particularly for styling things which already have a fixed DTD
which cannot be altered. But then, we already have in CSS2 a way to get
at values of arbitrary attributes so perhaps a remapping mechanism isn't
actually needed after all.

> 
> > 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.

Unless you declare it in the internal DTD subset, of course.

--
Chris
Received on Monday, 9 August 1999 16:30:34 GMT

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