summaryrefslogtreecommitdiff
path: root/Base/home
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-16 19:45:50 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-16 19:46:02 +0100
commit085cafd80a0183b0ef6c0a658d6505493e6d8b1e (patch)
treefeb68e3416ee575121843447f0d22cd257d00af3 /Base/home
parenta32cae4c3bf4442b6298d93a95e618bf8a9cb1ce (diff)
downloadserenity-085cafd80a0183b0ef6c0a658d6505493e6d8b1e.zip
LibHTML: Support the :empty pseudo class
Diffstat (limited to 'Base/home')
-rw-r--r--Base/home/anon/www/empty.html26
-rw-r--r--Base/home/anon/www/welcome.html1
2 files changed, 27 insertions, 0 deletions
diff --git a/Base/home/anon/www/empty.html b/Base/home/anon/www/empty.html
new file mode 100644
index 0000000000..dbdfe62a6a
--- /dev/null
+++ b/Base/home/anon/www/empty.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<title>:empty test</title>
+<style>
+.box {
+ background-color: pink;
+ height: 80px;
+ width: 80px;
+}
+
+.box:empty {
+ background-color: lime;
+}
+</style>
+</head>
+<body>
+<div class="box"><!-- I will be lime. --></div>
+<div class="box">I will be pink.</div>
+<div class="box">
+ <!-- I will be pink in older browsers because of the whitespace around this comment. -->
+</div>
+<div class="box">
+ <p><!-- I will be pink in all browsers because of the non-collapsible whitespace and elements around this comment. --></p>
+</div>
+</body>
+</html>
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html
index 1fbecdd0ca..7405b028c8 100644
--- a/Base/home/anon/www/welcome.html
+++ b/Base/home/anon/www/welcome.html
@@ -26,6 +26,7 @@ h1 {
<li><a href="small.html">small</a></li>
<li><a href="first-child.html">:first-child</a></li>
<li><a href="last-child.html">:last-child</a></li>
+ <li><a href="empty.html">:empty</a></li>
<li><a href="form.html">form</a></li>
<li><a href="borders.html">borders</a></li>
<li><a href="css.html">css</a></li>