summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/selectors/not-links.html
blob: 58cef1a282e8e5a2d7ce17d614e9c4b15ce1ccf6 (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
<!DOCTYPE html>
<title>Test that *:not(:link):not(:visited) does not match links</title>
<link rel="match" href="not-links-ref.html">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#negation">
<style>
  * {
    /* Browsers typically ignore the :visited alpha and use the unvisited
       alpha instead, which by default is 0, in which case a failure would
       not be detected. */
    background-color: white;
  }
  div *:not(:link):not(:visited) {
    background-color: green;
  }
</style>
<body>
  <div>
    <a href="#">Unvisited (<span>Green</span>)</a>
    <a href="#">Visited (<span>Green</span>)</a>
    <span>Green</span>
  </div>
  <p>
    Only "Green" should have green backgrounds.
  </p>
</body>