Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/pservers/scripted/stop-color-inheritance-currentcolor.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="UTF-8"?>
color="red">
<title>SVG Paint Servers: 'stop-color' inheritance of 'currentcolor'</title>
<metadata>
</metadata>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<linearGradient stop-color="currentcolor" id="g">
<stop stop-color="inherit" color="green"/>
</linearGradient>
<script><![CDATA[
test(function() {
let stop = document.querySelector('stop');
assert_equals(getComputedStyle(stop).stopColor, 'rgb(0, 128, 0)');
}, '"currentcolor" is inherited as a keyword');
]]></script>
</svg>