This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24383 - Is :nth-match() and :nth-last-match() are necessary?
Summary: Is :nth-match() and :nth-last-match() are necessary?
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Selectors (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: fantasai
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-24 16:02 UTC by Arkadiusz Michalski (Spirit)
Modified: 2014-01-28 15:13 UTC (History)
0 users

See Also:


Attachments

Description Arkadiusz Michalski (Spirit) 2014-01-24 16:02:10 UTC
It's clear how this selector "p.foo:nth-child(even)" work, like you describe, and why you put this ":nth-match(even p.foo)".

But this two selectors:

:nth-match(even of p.foo)
p.foo:nth-of-type(even)

don't have the same result?

So only improve for this new pseudo is that whe can use selector list:

:nth-match(even of p,div) {}
the same as:
:nth-match(even of p), :nth-match(even of div) {}
p:nth-of-type(even), div.foo:nth-of-type(even) {}

or :nth-match(even of p,div) means, take p and div (it would be one sub sibling list) and start indexing. This will be nice, but when I see that selector list is treated as union, benefit is less. Or add new variant (conjunction) for argument in functional pseudo, like p^div, p&div, or sth similar.
Comment 1 Arkadiusz Michalski (Spirit) 2014-01-28 15:13:12 UTC
Ok, now I see that 

:nth-match(even of p.foo)
p.foo:nth-of-type(even)

is not same, this is same:

:nth-match(even of p)
p:nth-of-type(even)

But still wondering how interpretate list of selector in this :nth-match(even of p,div).