summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-pseudo/target-text-006.html
blob: 6c73ebd028f12b66badb7214dee14baf341fbad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<meta charset="utf-8">
<title>CSS Pseudo-Elements Test: ::target-text color rendering - text rendered once</title>
<link rel="help" href="https://drafts.csswg.org/css-pseudo/#selectordef-target-text">
<link rel="match" href="target-text-two-words-ref.html">
<style>
  p.white { color: white; }
  p::target-text {
    color: black;
    background-color: orange;
  }
</style>
<p>PASS if the text below is rendered black on an orange background.</p>
<p class="white">match me</p>
<script>
  window.location.hash = "#:~:text=match%20me";
</script>