<!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>
