summaryrefslogtreecommitdiff
path: root/Base/res/html/misc/where-selector.html
blob: f5749a76a5e5c507ea9e659fc7e1db82854af67f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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>