use-element-attr-selector-transition.tentative.html (818B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <title>SVG Test: Attribute change in template starts transition in <use> element tree</title> 4 <link rel="help" href="https://svgwg.org/svg2-draft/struct.html#UseElement"> 5 <link rel="help" href="https://github.com/w3c/svgwg/issues/1002"> 6 <link rel="match" href="use-element-selector-ref.html"> 7 <style> 8 #rect { fill: black; transition: fill 1000s steps(2, start); } 9 [attr] > #rect { fill: lime; } 10 </style> 11 <svg> 12 <use id="use_elm" xlink:href="#tmpl" /> 13 <defs> 14 <g id="tmpl"> 15 <rect id="rect" width="100" height="100"></rect> 16 </g> 17 </defs> 18 </svg> 19 <script> 20 requestAnimationFrame(() => { 21 requestAnimationFrame(() => { 22 tmpl.setAttribute("attr", "val"); 23 document.documentElement.classList.remove('reftest-wait'); 24 }); 25 }); 26 </script>