W3C home > Mailing lists > Public > www-style@w3.org > April 2013

Re: [css-selectors] Proposal: Logical Combinators / Sets

From: Simon Sapin <simon.sapin@exyr.org>
Date: Sat, 06 Apr 2013 11:52:12 +0200
Message-ID: <515FF04C.9060702@exyr.org>
To: François REMY <francois.remy.dev@outlook.com>
CC: Brian Kardell <bkardell@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Le 05/04/2013 18:17, François REMY a écrit :
> You seem to miss that you can't do :not() on complex selectors,

Indeed, Selectors 3 does not allow that. AFAIK this is because of 
implementer concerns about being able to make it fast enough for dynamic 
DOM updates. Renaming it :noneof() would not change that.

Tab edited Selectors 4 just two days ago to add "selector profiles", in 
order to fix exactly that. The "complete" profile allows complex 
selectors in :not() and :matches()

http://dev.w3.org/csswg/selectors4/#negation


My point is that Brian original request can be answered by allowing 
complex selectors in :not() and :matches(), without adding redundant 
pseudo-classes.


> and the same goes for the AND juxtaposition.

That’s why a "one argument" :matches() is useful (assuming the 
"complete" profile), it provides grouping.


> .list .item:any-of(  .start,  :all-of(.start ~ *, :not(.end ~ *))   )

.list .item:matches(.start, :matches(.start ~ *):not(.end ~ *))

-- 
Simon Sapin
Received on Saturday, 6 April 2013 09:52:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:10 UTC