diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-03-17 16:11:23 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-18 11:34:02 +0100 |
commit | 47eb4b2db7496c1309092e94c2c445c5edac7885 (patch) | |
tree | 22bf86ca80a30564b61e0ccde168bb540795a717 /Base/res | |
parent | c148ed50bb61df0d5109a91fb6a9de03631d3e88 (diff) | |
download | serenity-47eb4b2db7496c1309092e94c2c445c5edac7885.zip |
Base: Add a test page for the CSS :where() selector
This behaves identically to :is() except for specificity, so this test
page is identical to the other one. It's not because I'm lazy. :^)
Diffstat (limited to 'Base/res')
-rw-r--r-- | Base/res/html/misc/welcome.html | 5 | ||||
-rw-r--r-- | Base/res/html/misc/where-selector.html | 38 |
2 files changed, 41 insertions, 2 deletions
diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index 9181d6e737..48da06eb4f 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -96,8 +96,9 @@ <li><a href="nth-last-of-type.html">:nth-last-of-type</a></li> <li><a href="empty.html">:empty</a></li> <li><a href="root.html">:root</a></li> - <li><a href="is-selector.html">:is</a></li> - <li><a href="not-selector.html">:not</a></li> + <li><a href="is-selector.html">:is()</a></li> + <li><a href="not-selector.html">:not()</a></li> + <li><a href="where-selector.html">:where()</a></li> <li><a href="hover.html">:hover</a></li> <li><h3>Properties</h3></li> <li><a href="backgrounds.html">Backgrounds</a></li> diff --git a/Base/res/html/misc/where-selector.html b/Base/res/html/misc/where-selector.html new file mode 100644 index 0000000000..f5749a76a5 --- /dev/null +++ b/Base/res/html/misc/where-selector.html @@ -0,0 +1,38 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>:where() test</title> + <style> + div { + border: 1px solid black; + margin-bottom: 1em; + padding: 0 0.5em; + } + .special :where(h2, p) { + background-color: lime; + } + .forgiving :where(&&&fakhsdaskjhd, h2, p) { + background-color: lime; + } + </style> +</head> +<body> + <h1>:where() test</h1> + <div> + <h2>Nothing</h2> + <p>These should have no background.</p> + </div> + <br/> + <div class="special"> + <h2>.special :where(h2, p)</h2> + <p>These should have a green background.</p> + </div> + <br/> + <div class="forgiving"> + <h2>.forgiving :where(&&&fakhsdaskjhd, h2, p)</h2> + <p>These should have a green background. :where() takes a "permissive selector list", + so even though part of it is invalid, this does not make the whole selector-list invalid.</p> + </div> +</body> +</html> |