Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/background-clip-color-repaint.html - WPT Dashboard Interop Dashboard
<!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">
<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>