RE: draft-ietf-html-style-00.txt & class as a general selector

Hakon Lie (
Thu, 7 Dec 1995 10:30:53 +0100 writes:

> I *WOULD* like to see, however, the ability to set style properties on a
> class independent of the element name. E.g.: [CLASS="foo"] { color:blue }
> Should this be allowed in CSS level 1? It is similar to the
> TAG[ATTRIBNAME="value"] selection described in the sketch of Level 2 in the
> fifth draft spec. It would seem an intelligent thing to add to Level 1,

Yes, we plan to put this in. Various notations have been suggested:

[CLASS="foo"] { color: blue }
*.foo { color: blue }
.foo { color: blue }

The first one is verbose. The second introduces wildcards which CSS1
isn't quite ready for (people would e.g. expect "H?.foo" to work). The
last reminds old-timers of ?roff, but otherwise goes well along with a
principle in CSS1 context-sensitive selectors: wildcards are there by



Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France