1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:07:35 +00:00

LibWeb: Support the :first-of-type CSS selector :^)

This commit is contained in:
Andreas Kling 2021-04-06 12:23:32 +02:00
parent 4f690408af
commit 0eb9a9dd13
6 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,13 @@
<style>
article :first-of-type {
background-color:pink;
}
</style>
<article>
<div>This `div is first!</div>
<div>This <span>nested `span` is first</span>!</div>
<div>This <em> nested `em` is first</em>, but this <em>nested `em` is last</em>!</div>
<div>This <span>nested `span` gets styled</span>!</div>
<b>This `b` qualifies!</b>
<div>This is the final `div`.</div>
</article>

View file

@ -38,6 +38,7 @@ span#loadtime {
<p>This page loaded in <b><span id="loadtime"></span></b> ms</p>
<p>Some small test pages:</p>
<ul>
<li><a href="first-of-type.html">CSS :first-of-type selector</a></li>
<li><a href="background-repeat-test.html">background image with repetition rules</a></li>
<li><a href="link-over-zindex-block.html">link elements with background box placed with z-index</a></li>
<li><a href="contenteditable.html">contenteditable</a></li>