tor-browser

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

rotate-interpolation-math-functions-tentative.html (1290B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>rotate interpolation with css math functions</title>
      6    <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#propdef-rotate">
      7    <script src="/resources/testharness.js"></script>
      8    <script src="/resources/testharnessreport.js"></script>
      9    <script src="/css/support/interpolation-testcommon.js"></script>
     10  </head>
     11 
     12  <style>
     13    :root {
     14      font-size: 10px;
     15    }
     16  </style>
     17  <body>
     18    <script>
     19      test_interpolation({
     20        property: 'rotate',
     21        from: '100deg',
     22        to: 'calc(sign(20rem - 20px) * 180deg)',
     23      }, [
     24        {at: -1, expect: '20deg'},
     25        {at: 0, expect: '100deg'},
     26        {at: 0.125, expect: '110deg'},
     27        {at: 0.875, expect: '170deg'},
     28        {at: 1, expect: '180deg'},
     29        {at: 2, expect: '260deg'}
     30      ]);
     31 
     32      test_interpolation({
     33        property: 'rotate',
     34        from: 'calc(sign(20rem - 20px) * 100deg)',
     35        to: 'calc(progress(10rem, 20px, 100px) * 180deg)',
     36      }, [
     37        {at: -1, expect: '20deg'},
     38        {at: 0, expect: '100deg'},
     39        {at: 0.125, expect: '110deg'},
     40        {at: 0.875, expect: '170deg'},
     41        {at: 1, expect: '180deg'},
     42        {at: 2, expect: '260deg'}
     43      ]);
     44    </script>
     45  </body>
     46 </html>