tor-browser

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

font-stretch-interpolation-math-functions.html (1349B)


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