mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
LibHTML: Implement matching for descendant selectors
The CSS engine now correctly matches selectors like "#foo #bar #baz".
This commit is contained in:
parent
b587eb2f4d
commit
156b35742a
3 changed files with 60 additions and 5 deletions
32
Base/home/anon/www/selectors.html
Normal file
32
Base/home/anon/www/selectors.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Selector test</title>
|
||||
<style>
|
||||
#foo #bar #baz {
|
||||
background-color: #00ff00;
|
||||
}
|
||||
.abc .def div {
|
||||
background-color: #ffffff;
|
||||
border-style: solid;
|
||||
border-width: 1;
|
||||
border-color: #00ff00;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo">
|
||||
<div id="bar">
|
||||
<div id="baz">
|
||||
I should have a green background.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="abc">
|
||||
<div class="def">
|
||||
<div>hello</div>
|
||||
<div>hello</div>
|
||||
<div>hello</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -21,6 +21,7 @@ h1 {
|
|||
<li><a href="lorem.html">lorem ipsum</a></li>
|
||||
<li><a href="phint.html">presentational hints</a></li>
|
||||
<li><a href="images.html">images</a></li>
|
||||
<li><a href="selectors.html">selectors</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue