summaryrefslogtreecommitdiff
path: root/Base/res/html
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-06 12:23:32 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-06 13:06:42 +0200
commit0eb9a9dd133fafd672d9217b4c9e06f88e653891 (patch)
tree950efd6b4a2fce25c0add64ca905dfaa4fa06bc7 /Base/res/html
parent4f690408af762c707166bc6448b459e0e16d22a2 (diff)
downloadserenity-0eb9a9dd133fafd672d9217b4c9e06f88e653891.zip
LibWeb: Support the :first-of-type CSS selector :^)
Diffstat (limited to 'Base/res/html')
-rw-r--r--Base/res/html/misc/first-of-type.html13
-rw-r--r--Base/res/html/misc/welcome.html1
2 files changed, 14 insertions, 0 deletions
diff --git a/Base/res/html/misc/first-of-type.html b/Base/res/html/misc/first-of-type.html
new file mode 100644
index 0000000000..9749825aeb
--- /dev/null
+++ b/Base/res/html/misc/first-of-type.html
@@ -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>
diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html
index ee2d4c55c9..bf826530c4 100644
--- a/Base/res/html/misc/welcome.html
+++ b/Base/res/html/misc/welcome.html
@@ -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>