Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-transitions/crashtests/transition-var-gradient-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>Transitioning with a var() linear-gradient should not crash</title>
<style>
#target {
background-image: linear-gradient(var(--, black), white);
transition: color 1s;
}
</style>
<div id="target"></div>
<script>
'use strict';
getComputedStyle(target).color;
target.style.color = 'green';
getComputedStyle(target).color;
</script>