summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/pservers/reftests/gradient-transform-03.svg
blob: 25e304614dbe43422e5d0daa9b9e03f9944aabe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" class="reftest-wait">
  <title>Gradient with 'transform' property added dynamically</title>
  <h:link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#pservers-LinearGradientElementGradientTransformAttribute"/>
  <h:link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-attribute-specificity"/>
  <h:link rel="match" href="reference/green-100x100.svg"/>
  <h:script src="/common/reftest-wait.js"/>
  <h:script src="/common/rendering-utils.js"/>

  <linearGradient id="lg">
    <stop offset="0" stop-color="green"/>
    <stop offset="0.5" stop-color="green"/>
    <stop offset="1" stop-color="red"/>
  </linearGradient>
  <rect width="100" height="100" fill="url(#lg)"/>
  <script>
    waitForAtLeastOneFrame().then(() => {
      const gradient = document.getElementById('lg');
      gradient.style.transform = 'scale(2)';
      takeScreenshot();
    });
  </script>
</svg>