Re: [selectors] :nth-child(An+B of selector) with a pseudo element

On Mon, Sep 15, 2014 at 8:19 PM, Benjamin Poulain <bpoulain@apple.com> wrote:
> Hi,
>
> Currently, :nth-child() does not restrict pseudo-elements like :not() does. Shouldn’t it have the same restrictions?
>
> For example:
>     :nth-child(2n of ::after)
>     :nth-child(2n+1 of ::first-letter)
> do not make much sense.

It's not actually necessary to restrict it; :nth-child() only applies
to elements, and only counts elements, so using a pseudo-element in
the selector argument just won't match anything.

~TJ

Received on Tuesday, 16 September 2014 18:21:18 UTC