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: Ian Hickson <ianh@netscape.com>
Date: Mon, 16 Oct 2000 08:56:22 -0700 (Pacific Daylight Time)
To: fantasai <fantasai@escape.com>
cc: www-style@w3.org
Message-ID: <Pine.WNT.4.21.0010160849080.984-100000@HIXIE.netscape.com>
On Mon, 16 Oct 2000, fantasai wrote:

>| Of course, as with my argument against :subject pseudo-thing, the :matches
>| pseudo-class is inherently more powerful than the !() syntax.
>| 
>| For example:
>| 
>|    :not-matches(DIV.navbar > P# SPAN) > A
>| 
> 
> Now I'm confused about your syntax. It wouldn't be
>   P:not-matches(DIV.navbar > # SPAN) > A
> ?

Depends what exactly you are trying to match.

The '#' means 'the element the :matches pseudo-class is on'.

So by definition, the following two selectors match all 'X' elements:

   X, X:matches(X#)

Similarly, the following will _never_ match:

   X:not-matches(X#)


> The syntax scares me.

I'm open to better syntaxes! :-)

-- 
Ian Hickson                                     )\     _. - ._.)       fL
Netscape, Standards Compliance QA              /. `- '  (  `--'
+1 650 937 6593                                `- , ) -  > ) \
irc.mozilla.org:Hixie _________________________  (.' \) (.' -' __________
Received on Monday, 16 October 2000 11:58:06 GMT

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