1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

LibHTML: Support the :empty pseudo class

This commit is contained in:
Andreas Kling 2019-12-16 19:45:50 +01:00
parent a32cae4c3b
commit 085cafd80a
5 changed files with 35 additions and 0 deletions

View file

@ -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>

View file

@ -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>