use-element-id-selector-transition.tentative.html (840B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <title>SVG Test: Id 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 #id > #rect { fill: lime; } 10 </style> 11 <svg> 12 <use id="use_elm" xlink:href="#tmpl" /> 13 <defs> 14 <g id="tmpl"> 15 <g id="no_id"> 16 <rect id="rect" width="100" height="100"></rect> 17 </g> 18 </g> 19 </defs> 20 </svg> 21 <script> 22 requestAnimationFrame(() => { 23 requestAnimationFrame(() => { 24 no_id.setAttribute("id", "id"); 25 document.documentElement.classList.remove('reftest-wait'); 26 }); 27 }); 28 </script>