testing/web-platform/tests/css/selectors/is-where-visited.html
author Cosmin Sabou <csabou@mozilla.com>
Sat, 12 Jul 2025 09:18:08 +0300 (10 hours ago)
changeset 796290 5ad1f0c58c82bdfa2f42fed870bbe143465398d0
parent 554388 34056381c8546cb835fd9a12f5fba025a678fde2
permissions -rw-r--r--
Revert "Bug 1977019 - re-enable hw video decoding testing. r=media-playback-reviewers,jolin" for causing win mda failures on test_hw_video_decoding.html This reverts commit 158474bdc0cf585b701bc47921f0a7d84f7bb84d.
<!DOCTYPE html>
<title>:is/:where combined with :visited/:link</title>
<link rel="help" href="https://drafts.csswg.org/selectors-4/#matches">
<link rel="match" href="is-where-visited-ref.html">
<style>
  :visited, :link {
    color: black;
  }

  #parent1 :is(:visited) {
    color: green;
  }
  #parent1 :is(:link):nth-child(even) {
    color: magenta;
  }

  :is(#parent2 .a + :visited, #parent2 .e:link) {
    color: tomato;
  }

  main :is(a:visited > :where(.a + span + span, .f)) {
    color: skyblue;
  }

  main :is(a:link > :where(.a + span + span, .f)) {
    color: blue;
  }

  main :is(a:is(:link, :visited) > :where(.b, .e)) {
    color: maroon;
  }
</style>
<main>
  <div id=parent1>
    <a class=a href="">a</a>
    <a class=b href="">b</a>
    <a class=c href="">c</a>
    <a class=d href="unvisited">d</a>
    <a class=e href="unvisited">e</a>
    <a class=f href="unvisited">f</a>
  </div>
  <div id=parent2>
    <a class=a href="">a</a>
    <a class=b href="">b</a>
    <a class=c href="">c</a>
    <a class=d href="unvisited">d</a>
    <a class=e href="unvisited">e</a>
    <a class=f href="unvisited">f</a>
  </div>
  <a id=parent3 href="">
    <span class=a>a</span>
    <span class=b>b</span>
    <span class=c>c</span>
    <span class=d>d</span>
    <span class=e>e</span>
    <span class=f>f</span>
  </a>
  <br>
  <a id=parent4 href="unvisited">
    <span class=a>a</span>
    <span class=b>b</span>
    <span class=c>c</span>
    <span class=d>d</span>
    <span class=e>e</span>
    <span class=f>f</span>
  </a>
</main>