Re: a recall for a missing combinator

On 11/16/11 4:49 AM, Tab Atkins Jr. wrote:
> I approve of this.  Let's call it the "closest descendant" combinator.
>   Perhaps it could look like ">>".

What would it match, exactly?  Recall that the requirement is to have 
something that given this markup:

   <article class=”product>
                 <div class=”main”>
                                <article class=”review”>
   </ article>

matches only the first <header>.

Seems to me like that's already possible with the proposed changes to 
:not, by the way:

   article.product header:not( header)

> It's like the descendant
> combinator, except when you're walking up the tree to find the
> ancestor, you *also* look for someone else that matches the
> descendant.

If you just did that then you would match both <header>s in the testcase 
above.  So that doesn't work to address the use case put forward.


Received on Tuesday, 15 November 2011 22:06:45 UTC