-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fix :nth-*(an+b) pseudo-classes selectors for negative a's #42
Conversation
</head> | ||
<body> | ||
<div id="test"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge diff unrelated to the rest of the commit. Could you avoid touching non-trailing whitespace? Or if you really want to get rid of tabs, please do it in a separate commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, it's my editor default settings. Will clean it up
Does that look better? |
@SimonSapin , do you think this can be merged? |
Please see #48. |
Fix :nth-last-child(1)/:nth-last-of-type(1) translations (fixes #15)
Current coverage is 95.43%@@ master #42 diff @@
==========================================
Files 3 3
Lines 708 723 +15
Methods 0 0
Messages 0 0
Branches 114 121 +7
==========================================
+ Hits 673 690 +17
Misses 19 19
+ Partials 16 14 -2
|
Superseded by #60 |
Fixes #15 and #46
I rewrote
xpath_nth_child_function()
to follow the logic I wrote down on paper with simple equations. It's not the nicest code.I also changed the expected result for
li:nth-last-child(2n+2)
:as I understand the W3C specs, an+b-1 siblings after should return
li
's that have 2n+1 siblings after them, soli
6, 4 and 2 (of the 7li
in the test document)http://www.w3.org/TR/selectors/#nth-last-child-pseudo