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

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

From: Eric A. Meyer <eric@meyerweb.com>
Date: Thu, 12 Mar 2009 15:25:10 -0400
Message-Id: <a06230910c5df117d294e@[192.168.1.200]>
To: www-style@w3.org
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.

-- 
Eric A. Meyer (eric@meyerweb.com)     http://meyerweb.com/
Received on Thursday, 12 March 2009 19:25:47 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:17 GMT