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

On Mon, 9 Oct 2000, Jonas Sicking 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

It's *not* a pseudo-class. A pseudo-class may or may not match. ':not'
just modifies a previous simple selector to mean something else.

This is just like the ':subject' "thing" -- reusing the pseudo-class
syntax for something else.


> I completly agree that the "not-" syntax is not perfect. However the :not
> pseudoclass looks even stranger to me. Think of a selector like
> 
> a[href='http://www.w3.org']:not:contains('foobar'):not
> and
> a[href='http://www.w3.org']:not[class~='standard']:hover:not
> 
> that gives really messy syntax.

No kidding.


> I think it will be hard to find a good common syntax for attributes,
> pseudoclasses and elements because they have different syntax in CSS.
> If they don't share a "match syntax" why should they share a "don't
> match" syntax.

Absolutely. Couldn't have said it better myself!

-- 
Ian Hickson                                     )\     _. - ._.)       fL
Netscape, Standards Compliance QA              /. `- '  (  `--'
+1 650 937 6593                                `- , ) -  > ) \
irc.mozilla.org:Hixie _________________________  (.' \) (.' -' __________

Received on Monday, 9 October 2000 18:21:08 UTC