Re: [selectors] Are really arbitrary selectors allowed in :not()?

On 1/20/15 11:36 AM, Sebastian Zartner wrote:
>> span:not(div > .someclass) matches any span that does not have a class "someclass" and is not under a div.
>
> So an equivalent to :not(div) > span:not(.someclass).

Not quite.  For example, consider this document:

   data:application/xhtml+xml,<span xmlns="http://www.w3.org/1999/xhtml"/>

That element matches "span:not(div > .someClass)" but does not match 
":not(div) > span:not(.someClass)".

But yes, for non-root elements it's equivalent.

-Boris

Received on Tuesday, 20 January 2015 19:25:00 UTC