- From: Florian Rivoal <florian@rivoal.net>
- Date: Tue, 20 Jan 2015 17:54:17 +0100
- To: Sebastian Zartner <sebastianzartner@gmail.com>
- Cc: Benjamin Poulain <benjamin@webkit.org>, www-style list <www-style@w3.org>
> On 20 Jan 2015, at 17:36, Sebastian Zartner <sebastianzartner@gmail.com> 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 equivalent selectors, although they end up matching the same thing. "span:not(div > .someclass)" requires the span not to have .someclass and not to be the child of a div. ":not(div) > span:not(.someclass)" requires the span not to have .someclass and to be the child of something that is not a div. A span that's not the child of anything would match the first one, but not the second. That can't happen in html, since a span will at least be the child of 'body', so they end up being equivalent, but only indirectly. - Florian
Received on Tuesday, 20 January 2015 16:54:43 UTC