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-image-gradient-currentcolor-radial-repaint.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Backgrounds and Borders: Repaint gradient on currentColor change</title>
<link rel="author" title="Steinar H. Gunderson" href="mailto:sesse@chromium.org">
<link rel="match" href="background-image-gradient-currentcolor-radial-repaint-ref.html">
<style>
#outer {
color: red;
}
#inner {
width: 100px;
height: 100px;
background: radial-gradient(white, currentColor);
}
</style>
<p>There should be a square with a white-to-green gradient and some text below.</p>
<div id="outer">
<div id="inner">This text should be green</div>
</div>
<script>
requestAnimationFrame(function(){
requestAnimationFrame(function(){
outer.style.color = "green";
document.documentElement.classList.remove("reftest-wait");
});
});
</script>