diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-03-17 15:15:35 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-18 11:34:02 +0100 |
commit | 0d01097a5400bcbc0f0bd011b78a0b12a979f60f (patch) | |
tree | 01b80adccc94f3c05cb0631c63b939ed9cf9af89 /Base/res | |
parent | 5319e2ba8e5684edda17bfaf6aaa5cffe7375c75 (diff) | |
download | serenity-0d01097a5400bcbc0f0bd011b78a0b12a979f60f.zip |
Base: Add a test page for the CSS :is() selector
Diffstat (limited to 'Base/res')
-rw-r--r-- | Base/res/html/misc/is-selector.html | 38 | ||||
-rw-r--r-- | Base/res/html/misc/welcome.html | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/Base/res/html/misc/is-selector.html b/Base/res/html/misc/is-selector.html new file mode 100644 index 0000000000..96b1cb6bda --- /dev/null +++ b/Base/res/html/misc/is-selector.html @@ -0,0 +1,38 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>:is() test</title> + <style> + div { + border: 1px solid black; + margin-bottom: 1em; + padding: 0 0.5em; + } + .special :is(h2, p) { + background-color: lime; + } + .forgiving :is(&&&fakhsdaskjhd, h2, p) { + background-color: lime; + } + </style> +</head> +<body> + <h1>:is() test</h1> + <div> + <h2>Nothing</h2> + <p>These should have no background.</p> + </div> + <br/> + <div class="special"> + <h2>.special :is(h2, p)</h2> + <p>These should have a green background.</p> + </div> + <br/> + <div class="forgiving"> + <h2>.forgiving :is(&&&fakhsdaskjhd, h2, p)</h2> + <p>These should have a green background. :is() 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> diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index 79b19629b1..9181d6e737 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -96,6 +96,7 @@ <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="hover.html">:hover</a></li> <li><h3>Properties</h3></li> |