summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-nesting/has-nesting.html
blob: 83fe720236fd7d6ccd708e8cbd6fd340bcd43984 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!doctype html>
<title>Nested has shouldn't match</title>
<link rel="help" href="https://drafts.csswg.org/selectors/#relational">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1864647">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9600">
<link rel="match" href="has-nesting-ref.html">
<style>
ul { background: green }

li:has(strong) {
  display: none;

  :has(> &) {
    background: red;
  }
}
</style>
<ul>
  <li><strong>Foo</strong></li>
  <li>Bar</li>
</ul>