diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-03-02 15:58:16 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-02 17:39:57 +0100 |
commit | 973f3c3642446022e7baa4b566555e9c09540214 (patch) | |
tree | 7a238815a8bd51e40d6cee75706ab690da3c4d2b /Base/res/html/misc/nth-last-child.html | |
parent | 6a4978764f502c6c56ad9c7d9a09a58e62740cf0 (diff) | |
download | serenity-973f3c3642446022e7baa4b566555e9c09540214.zip |
LibWeb: Correct handling of negative step values in nth-foo() selectors
This should be 1% on Acid3. :^)
Added the `-5n+3` case to all `nth-of-whatever()` selector test pages,
so we can easily check that it works.
Diffstat (limited to 'Base/res/html/misc/nth-last-child.html')
-rw-r--r-- | Base/res/html/misc/nth-last-child.html | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Base/res/html/misc/nth-last-child.html b/Base/res/html/misc/nth-last-child.html index 24bff73546..6c514a0a18 100644 --- a/Base/res/html/misc/nth-last-child.html +++ b/Base/res/html/misc/nth-last-child.html @@ -17,7 +17,8 @@ .plus-n > div:nth-last-child(+n), /** "+n" is special case inside parser. */ .minus-n > div:nth-last-child(-n), /** "-n" is special case inside parser. */ ._0n-plus-1 > div:nth-last-child(-0n+1), - .n-plus-2__minus-n-plus-3 > div:nth-last-child(+n + 2 ):nth-last-child( -n+3) { + .n-plus-2__minus-n-plus-3 > div:nth-last-child(+n + 2 ):nth-last-child( -n+3), + .acid3 > div:nth-last-child(-5n+3) { background-color: lightblue; } </style> @@ -136,5 +137,24 @@ <div>4 +</div> <div>5</div> </div> + +<h4>:nth-last-child(-5n+3) - Acid3</h4> +<div class="acid3"> + <div>1</div> + <div>2</div> + <div>3</div> + <div>4</div> + <div>5</div> + <div>6</div> + <div>7</div> + <div>8</div> + <div>9</div> + <div>10</div> + <div>11</div> + <div>12</div> + <div>13+</div> + <div>14</div> + <div>15</div> +</div> </body> </html> |