W3C home > Mailing lists > Public > www-style@w3.org > April 1998

The attribute selectors [x|=a] and [x~=a]

From: Ian Hickson <exxieh@bath.ac.uk>
Date: Wed, 15 Apr 1998 21:18:17 +0100
Message-ID: <000b01bd696c$14b48040$cb20268a@hpxu>
To: www-style@w3.org
I've been rereading the Proposed Recomendation [1] and I am having problems
with the attribute selectors.

(I know I mentioned this during the big regexp discussion a few weeks back,
but now I've reread it I am getting worried again).

Why have the two attribute selectors, one for space seperated lists and one
for hyphen seperated lists? Why not just a single selector for an (author
selected) seperated list?

I suggest
[att =val]
which would be the two equivalents for ~= and |= respectively, and then you
could also do
for a slash seperated list (eg, a uri). (I admit the [att =val] is dangerous
because the space isn't obvious).

I really believe that the current scheme is not "Good". Say that in a few
years CSS4 implementors want to add a tilde seperated list. Now what?
[att?=val] maybe? Then a question mark seperate list? [att*=val] ??

I know this will have no effect on the spec, but I thought that I would at
least air my worries! *GRIN*

[1] http://www.w3.org/TR/PR-CSS2/
PS: I am very impressed with the rest of the spec, especially the content
generation and automatic numbering. Very good work!! I really would like to
see a fully compliant CSS2 rendering engine. Let's see... 5 years, maybe?
(I would have liked regexp too, though... *snif*)
Ian Hickson
Version: 3.12   Info: www.geekcode.com
GIT/M/S d->-- s+: a--->? C++(+++)>$ U>*++++ P L+>+++++ E(+)>+++ W+++ N(+) o?
K? w@ O- !M V- PS+ PE- Y+ PGP>+ t 5+++>++++ X- R+(+++) tv b++(+++) DI++
D++(---)>++++ G>+++ e(*)>+++++ h!()(--) !r y?
Received on Thursday, 16 April 1998 15:16:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:47 UTC