tor-browser

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

scale-animation-math-functions-tentative.html (1246B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>scale interpolation with css math functions</title>
      6    <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms">
      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: 'scale',
     21        from: '100',
     22        to: 'calc(sign(20rem - 20px) * 180)',
     23      }, [
     24        {at: -1, expect: '20'},
     25        {at: 0, expect: '100'},
     26        {at: 0.125, expect: '110'},
     27        {at: 0.875, expect: '170'},
     28        {at: 1, expect: '180'},
     29        {at: 2, expect: '260'}
     30      ]);
     31 
     32      test_interpolation({
     33        property: 'scale',
     34        from: 'calc(sign(20rem - 20px) * 100)',
     35        to: 'calc(progress(10rem, 20px, 100px) * 180)',
     36      }, [
     37        {at: -1, expect: '20'},
     38        {at: 0, expect: '100'},
     39        {at: 0.125, expect: '110'},
     40        {at: 0.875, expect: '170'},
     41        {at: 1, expect: '180'},
     42        {at: 2, expect: '260'}
     43      ]);
     44    </script>
     45  </body>
     46 </html>