I think we can all agree that this selector would be very helpful, as indicated by many questions asked here on SO, which would be easily resolved by using it (see for example Can I combine :nth-child() or :nth-of-type() with an arbitrary selector? and linked questions). Usually we have to end up changing structure, adding classes or messing around with jQuery.
Why is this selector not in the standard? Why do we have :nth-of-type
, but not :nth-of-class
? Is there some reasoning behind it or is it just missing for no particular reason?