-
-
Notifications
You must be signed in to change notification settings - Fork 102
Implement nth-of-type when we are including the tagName #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Highlighting one unexpected change to the test results ... the following is preferred as the algo immediately cuts off if a unique match is found at a given level:
++.-of2·p:nth-child(2)·>·a (Expected)
--.cell:nth-child(1)·>·p:nth-of-type(1)·>·a (Actual)
Before, .cell:nth-child(1)·>·p:nth-child(2)·>·a is checked, but found to be non-unique, so algo continues exploring higher levels.
I don't know if it's desirable to fix this or not? And don't know how best to fix.
Note: up for debate, but the 'desired' selector would be .-of2 p:nth-of-type(1) > a which is unique
An implementation of
nth-of-type#3The idea here is to never allow the combination of a tagName + :nth-child — from the point of view that it's
(reasons given by @kfrederix)