tor-browser

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

image-slice-interpolation-math-functions-tentative.html (1739B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>border-image-slice 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.csswg.org/css-backgrounds/#the-border-image-slice">
      8    <script src="/resources/testharness.js"></script>
      9    <script src="/resources/testharnessreport.js"></script>
     10    <script src="/css/support/interpolation-testcommon.js"></script>
     11  </head>
     12  <style>
     13    :root {
     14      font-size: 10px;
     15    }
     16  </style>
     17  <body>
     18    <script>
     19      test_interpolation({
     20        property: 'border-image-slice',
     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: 'border-image-slice',
     34        from: '100%',
     35        to: 'calc(sign(20rem - 20px) * 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 
     45      test_interpolation({
     46        property: 'border-image-slice',
     47        from: 'calc(sign(20rem - 20px) * 100%)',
     48        to: 'calc(progress(10rem, 20px, 100px) * 180%)',
     49      }, [
     50        {at: -1, expect: '20%'},
     51        {at: 0, expect: '100%'},
     52        {at: 0.125, expect: '110%'},
     53        {at: 0.875, expect: '170%'},
     54        {at: 1, expect: '180%'},
     55        {at: 2, expect: '260%'}
     56      ]);
     57    </script>
     58  </body>
     59 </html>