diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-16 19:34:52 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-16 19:34:52 +0100 |
commit | c1474e594ebb71085782f6c10b310335d9b1b61a (patch) | |
tree | 02cb8e6a03ba7509d2f4d7654fef6f53fee20dee /Base/home/anon/www | |
parent | 870df4a8c615282abe0c9fedaf9b33de641be184 (diff) | |
download | serenity-c1474e594ebb71085782f6c10b310335d9b1b61a.zip |
LibHTML: Support the :first-child and :last-child pseudo classes
Diffstat (limited to 'Base/home/anon/www')
-rw-r--r-- | Base/home/anon/www/first-child.html | 24 | ||||
-rw-r--r-- | Base/home/anon/www/last-child.html | 23 | ||||
-rw-r--r-- | Base/home/anon/www/welcome.html | 2 |
3 files changed, 49 insertions, 0 deletions
diff --git a/Base/home/anon/www/first-child.html b/Base/home/anon/www/first-child.html new file mode 100644 index 0000000000..553d814668 --- /dev/null +++ b/Base/home/anon/www/first-child.html @@ -0,0 +1,24 @@ +<html> +<head> +<title>:first-child test</title> +<style> +p:first-child { + color: lime; + background-color: black; + padding: 5px; +} +</style> +</head> +<body> +<div> + <p>This text is selected!</p> + <p>This text isn't selected.</p> +</div> + +<div> + <h2>This text isn't selected: it's not a `p`.</h2> + <p>This text isn't selected.</p> +</div> + +</body> +</html> diff --git a/Base/home/anon/www/last-child.html b/Base/home/anon/www/last-child.html new file mode 100644 index 0000000000..562d85aac4 --- /dev/null +++ b/Base/home/anon/www/last-child.html @@ -0,0 +1,23 @@ +<html> +<head> +<title>:last-child test</title> +<style> +p:last-child { + color: lime; + background-color: black; + padding: 5px; +} +</style> +</head> +<body> +<div> + <p>This text isn't selected.</p> + <p>This text is selected!</p> +</div> + +<div> + <p>This text isn't selected.</p> + <h2>This text isn't selected: it's not a `p`.</h2> +</div> +</body> +</html> diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html index d11541fc1c..1fbecdd0ca 100644 --- a/Base/home/anon/www/welcome.html +++ b/Base/home/anon/www/welcome.html @@ -24,6 +24,8 @@ h1 { <p>Some small test pages:</p> <ul> <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="form.html">form</a></li> <li><a href="borders.html">borders</a></li> <li><a href="css.html">css</a></li> |