summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-highlight-api/painting/custom-highlight-painting-below-selection-ref.html
blob: 5c7bd9361bfa81a49561549faa1a677e7b9df6a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
  #highlighted {
    background: cyan;
    color: blue;
  }
  ::selection {
    background: blue;
    color: cyan;
  }
</style>
<body><span id="highlighted">Text should be blue over cyan here and <span id="selected">cyan over blue here</span>.</span>
<script>
  getSelection().setBaseAndExtent(selected, 0, selected, 1);
</script>