svgbox-initial.html (824B)
1 <!DOCTYPE html> 2 <title>transform-box: initial (SVG layout)</title> 3 <link rel="match" href="./reference/svgbox-ref.html"> 4 <link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-box"> 5 <meta name="assert" content="This should display a C shape with the center of the top endpoint at 200,100."/> 6 7 <style> 8 #target { 9 fill: green; 10 stroke: black; 11 stroke-width: 50; 12 transform-origin: 200px 100px; 13 transform: rotate(90deg); 14 } 15 </style> 16 17 <svg width="400" height="300"> 18 <path id="target" d="M 200 100 v 100 h 100 v -100"/> 19 </svg> 20 21 <div id="error"></div> 22 <script> 23 var refStyle = "view-box"; 24 var compStyle = getComputedStyle(document.getElementById('target')).transformBox; 25 if (refStyle != compStyle) 26 document.getElementById('error').textContent = "Error, got computed style " + compStyle; 27 </script>