Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/web-platform/tests/svg/pservers/reftests/stop-color-currentcolor-dynamic-001.svg
style="color: red">
<title>stop-color: Dynamically changing 'color' for a gradient with a stop with 'currentcolor'</title>
<h:link rel="match" href="reference/green-100x100.svg"/>
<linearGradient id="g">
<stop stop-color="currentcolor"/>
</linearGradient>
<rect width="50" height="100" fill="url(#g)"/>
<rect width="50" height="100" x="50" fill="currentcolor"/>
<script>
<![CDATA[
let root = document.querySelector(':root');
root.getBoundingClientRect(); // Force layout
root.style.color = 'green';
]]>
</script>
</svg>