summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-nesting/nest-containing-forgiving.html
blob: 561b5a3af5e73063acd58203be6dd476346137bc (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
<!DOCTYPE html>
<title>Nest-containing in forgiving parsing</title>
<link rel="author" title="Steinar H. Gunderson" href="mailto:sesse@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-nesting-1/">
<link rel="match" href="nest-containing-forgiving-ref.html">
<style>
  .test {
    background-color: red;
    width: 100px;
    height: 100px;
    display: grid;
  }

  .does-not-exist {
    :is(.test-1, !&) {
      background-color: green;
    }
  }

  .does-not-exist {
    :is(.test-2, :unknown(div,&)) {
      background-color: green;
    }
  }

  body * + * {
    margin-top: 8px;
  }
</style>
<body>
  <p>Tests pass if <strong>block is green</strong></p>
  <div class="test test-1"></div>
  <div class="test test-2"></div>
</body>