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

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