Re: [csswg-drafts] [selectors-5] add new selector immediate-adjecent-child

@Meteor0id isn't asking for a global count, but rather for something that counts "the first after the element the rest of the selector finds".  If the sibling list is `<a id=one/><b/><a id=two/><a id=three/>`, then `:first-of-type(a)` will grab the #one, while they want `b ~ :foo(a)`, which'll grab #two (but not #three).

We *do* already have this specified, as it turns out, tho it requires a bit of duplication: `b ~ :nth-child(1 of b ~ a)` will select the first `a` sibling following a `b`.  I don't think <https://drafts.csswg.org/selectors/#the-nth-child-pseudo>'s `of <selector>` feature has been implemented by anyone yet, tho.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2568#issuecomment-381701419 using your GitHub account

Received on Monday, 16 April 2018 18:21:14 UTC