tor-browser

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

transform-origin-computed.html (2298B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Transform Module Level 2: getComputedStyle().transformOrigin</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-origin-property">
      7 <meta name="assert" content="transform-origin computed value is two or three absolute lengths">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/css/support/computed-testcommon.js"></script>
     11 <style>
     12  #target {
     13    width: 200px;
     14    height: 300px;
     15    font-size: 40px;
     16  }
     17 </style>
     18 </head>
     19 <body>
     20 <div id="target"></div>
     21 <script>
     22 test_computed_value("transform-origin", "10%", "20px 150px");
     23 test_computed_value("transform-origin", "10% center", "20px 150px");
     24 test_computed_value("transform-origin", "20% 30px", "40px 30px");
     25 test_computed_value("transform-origin", "30px center", "30px 150px");
     26 test_computed_value("transform-origin", "40px top", "40px 0px");
     27 test_computed_value("transform-origin", "bottom right", "200px 300px");
     28 test_computed_value("transform-origin", "center", "100px 150px");
     29 test_computed_value("transform-origin", "center 50px", "100px 50px");
     30 test_computed_value("transform-origin", "center bottom", "100px 300px");
     31 test_computed_value("transform-origin", "center center", "100px 150px");
     32 test_computed_value("transform-origin", "center left", "0px 150px");
     33 test_computed_value("transform-origin", "left", "0px 150px");
     34 test_computed_value("transform-origin", "left 10px", "0px 10px");
     35 test_computed_value("transform-origin", "left bottom", "0px 300px");
     36 test_computed_value("transform-origin", "left center", "0px 150px");
     37 test_computed_value("transform-origin", "right 40%", "200px 120px");
     38 test_computed_value("transform-origin", "top", "100px 0px");
     39 
     40 test_computed_value("transform-origin", "-1px bottom 5px", "-1px 300px 5px");
     41 test_computed_value("transform-origin", "left center 6px", "0px 150px 6px");
     42 test_computed_value("transform-origin", "center top", "100px 0px");
     43 test_computed_value("transform-origin", "right bottom 7px", "200px 300px 7px");
     44 test_computed_value("transform-origin", "-1px -2px -3px");
     45 
     46 test_computed_value("transform-origin", "calc(-100% + 10px - 0.5em) calc(10px - 0.5em) calc(10px - 0.5em)", "-210px -10px -10px");
     47 </script>
     48 </body>
     49 </html>