W3C home > Mailing lists > Public > www-style@w3.org > October 2000

Re: selector negation (was: Re: New version of the Selectors module of CSS3)

From: Matthew Brealey <webmaster@richinstyle.com>
Date: 10 Oct 2000 10:35:22 -0000
Message-ID: <20001010103522.13162.qmail@phoenix.futurequest.net>
To: www-style@w3.org
You wrote:
> 
> Bjoern Hoehrmann wrote:
> 
> > I really don't like a 'not-' prefix as a generic modifier.
> > What about a suffix pseudo-class?
> > 
> >   p:contains("foo"):not
> 
> 
> Woof :-(
> 
> I think this is definitely unreadable, that no beginner will ever
> understand and use it correctly.
> 
> Sorry, but this is IMHO a really bad idea.

I agree - if negation is of the whole selector, it's probably useless;
if it's of the simple (i.e. simplest) selector, then you break the order-insensitive (at least in determining the selector's meaning)
nature of the CSS grammar; e.g., p:link:not:active is just horrible.

I did propose ! before, but maybe :!() is better.

Of course, probably most of this 'select every prime node from the set
of all P elements with class X that are the third child or later of
element Z' (ok so I exaggerate, but not much) would never get used
anyway. But it's probably better (i.e. in case the user also 'select every prime node from the set of all P elements with class X that are
the third child or later of element Z' (ok maybe not)), and maybe 
faster (cf. server preprocessing in PHP/mod_perl (no-one would be 
stupid enough to do it with a CGI binary)/custom Apache module versus client-side processing) to do this on the clientside than the server.

Incidentally, for the web, if you really need the 'expensive' selectors
(such as :contains), it probably *would* be better to do it server-side. Perhaps someone would like to write a library?
Received on Tuesday, 10 October 2000 06:35:30 GMT

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