W3C home > Mailing lists > Public > www-style@w3.org > March 2009

Re: [css3-selectors] minor question about :not()

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 18 Mar 2009 04:11:27 -0700
Message-ID: <49C0D6DF.4070609@inkedblade.net>
To: "Eric A. Meyer" <eric@meyerweb.com>
CC: www-style@w3.org
Eric A. Meyer wrote:
> At 8:40 PM +0300 3/12/09, Andrey Mikhalev wrote:
>> in 6.6.7:
>> "The negation pseudo-class, :not(X), is a functional notation taking a 
>> simple selector (excluding the negation pseudo-class itself and 
>> pseudo-elements) as an argument."
>> so, :not(:pseudo-element) - allowed by formal grammar -
>> is invalid selector or "useless" selector, as foo:not(bar) ?
>    Yes.  The limited scope of ':not()' has long bugged me.  It would be 
> really useful to be able to say something along the lines of 
> ':not(input, textarea, select, option) {margin: 0; padding: 0;}' -- thus 
> allowing us to style all elements that are not form controls. Yes, this 
> most often comes up in resets, which some people don't like, but there 
> are other use cases besides just resets.
>    I sort of get excluding pseudo-elements, but being limited to a 
> simple selector is annoying and I don't quite see the point.

I expect us to release that limitation in Selectors Level 4,
along with introducing a corresponding :matches() pseudo-class
(same as :not(), except it doesn't negate).

Received on Wednesday, 18 March 2009 14:24:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:25 UTC