summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-backgrounds/background-clip-color-repaint.html
blob: 4a5cee080096d1bec9c07655b988ab163e9e6131 (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
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Backgrounds and Borders: background-clip color background repaint</title>
<link rel="author" title="Rune Lillesveen" href="mailto:rune@opera.com">
<link rel="match" href="background-clip-color-repaint-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#the-background-clip">
<style>
  #outer {
    width: 150px;
    height: 150px;
    background-color: red;
  }
  #inner {
    border: 30px dashed green;
    padding: 30px;
    width: 30px;
    height: 30px;
    background-color: green;
    background-clip: content-box;
  }
</style>
<p>There should be a green square below.</p>
<div id="outer">
  <div id="inner"></div>
</div>
<script>
  requestAnimationFrame(function(){
    requestAnimationFrame(function(){
      inner.style.backgroundClip = "border-box";
      document.documentElement.classList.remove("reftest-wait");
    });
  });
</script>