tor-browser

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

offset-rotate-interpolation-math-functions.html (1460B)


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