mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:37:44 +00:00
LibWeb+Base: Fix An+B of foo
parsing
When I wrote the An+B parser, it was guaranteed to have no non-whitespace tokens after it. This is no longer true with the `of foo` syntax, so this patch corrects the logic when there is no `+B` segment. This makes this case shown on Twitter work correctly. :^) https://twitter.com/simevidas/status/1506657566012678151
This commit is contained in:
parent
5aad32b504
commit
c914e732d2
2 changed files with 37 additions and 12 deletions
|
@ -52,6 +52,9 @@
|
|||
.acid3 > div:nth-child(-5n+3) {
|
||||
background-color: lightblue;
|
||||
}
|
||||
.test-of-type > div:nth-child(2n of div) {
|
||||
background-color: lightblue;
|
||||
}
|
||||
.test-of > div:nth-child(3n+1 of .special) {
|
||||
background-color: lightblue;
|
||||
}
|
||||
|
@ -191,6 +194,22 @@
|
|||
<div>15</div>
|
||||
</div>
|
||||
|
||||
<h4>:nth-child(2n of div)</h4>
|
||||
<div class="test-of-type">
|
||||
<div>1</div>
|
||||
<p>Paragraph</p>
|
||||
<div>2 +</div>
|
||||
<p>Paragraph</p>
|
||||
<div>3</div>
|
||||
<p>Paragraph</p>
|
||||
<div>4 +</div>
|
||||
<p>Paragraph</p>
|
||||
<div>5</div>
|
||||
<p>Paragraph</p>
|
||||
<div>6 +</div>
|
||||
<p>Paragraph</p>
|
||||
</div>
|
||||
|
||||
<h4>:nth-child(3n+1 of .special)</h4>
|
||||
<div class="test-of">
|
||||
<div class="special">1 +</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue