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

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 UTC