tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

svgbox-border-box.html (897B)


      1 <!DOCTYPE html>
      2 <title>transform-box: border-box (SVG layout)</title>
      3 <link rel="match" href="./reference/svgbox-rect-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 rect whose center of rotation is at (20, 0) of its stroke-box."/>
      6 
      7 <style>
      8 #target {
      9  fill: green;
     10  stroke: black;
     11  stroke-width: 20;
     12  transform-box: border-box; /* alias for stroke-box */
     13  transform-origin: 20px 0px;
     14  transform: rotate(90deg);
     15 }
     16 </style>
     17 
     18 <svg width="400" height="300">
     19  <rect id="target" width="100" height="50" x="100" y="100"/>
     20 </svg>
     21 
     22 <div id="error"></div>
     23 <script>
     24 var refStyle = "border-box";
     25 var compStyle = getComputedStyle(document.getElementById('target')).transformBox;
     26 if (refStyle != compStyle)
     27  document.getElementById('error').textContent = "Error, got computed style " + compStyle;
     28 </script>