We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e2895f commit aab738eCopy full SHA for aab738e
2 files changed
CHANGELOG.md
@@ -4,6 +4,7 @@ QueryPath Changelog
4
# 4.0.2
5
6
- Fix for :nth-child(n+B) to select B-th and all following elements
7
+- Fix for :nth-child(-n+B) to select first B elements
8
- Update PHPUnit Test Suite to use @dataProvider in testPseudoClassNthChild() to reduce code repetition
9
10
# 4.0.1
tests/QueryPath/CSS/QueryPathEventHandlerTest.php
@@ -628,11 +628,12 @@ public function nthChildProvider(): array
628
//['i:nth-child(-2n)', 2, 'four' ], // Not totally sure what should be returned here
629
['i:nth-child(4n)', 1, 'four', 0], // every fourth row
630
['i:nth-child(4n+1)', 2, 'five' ], // first of every four rows
631
- ['i:nth-child(1)', 1, 'one', 0 ], // first row
+ ['i:nth-child(1)', 1, 'one', 0], // first row
632
['i:nth-child(0n-0)', 0, null ], // empty list
633
['i:nth-child(n+3)', 3, 'four' ], // third+ lines
634
- //['i:nth-child(0n+3)', 1, 'three' ], // third element in a group of siblings
635
- //['i:nth-child(-n+3)', 3, 'three' ], // first three lines
+ ['i:nth-child(-n+3)', 3, 'two' ], // first three elements
+ ['i:nth-child(-n+4)', 4, 'two' ], // first four lines
636
+ ['i:nth-child(0n+2)', 1, 'two', 0], // second element in a group of siblings
637
];
638
}
639
0 commit comments