tor-browser

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

line-height-computed.html (1442B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Inline Layout: getComputedStyle().lineHeight</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-inline-3/#line-height-property">
      7 <meta name="assert" content="line-height computed value is normal or a length.">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/css/support/computed-testcommon.js"></script>
     11 <style>
     12  #container {
     13    container-type: inline-size;
     14    width: 100px;
     15    font-size: 40px;
     16  }
     17 </style>
     18 </head>
     19 <body>
     20 <div id="container">
     21  <div id="target"></div>
     22 </div>
     23 <script>
     24 test_computed_value("line-height", "normal");
     25 
     26 test_computed_value("line-height", "0", "0px");
     27 test_computed_value("line-height", "2", "80px");
     28 test_computed_value("line-height", "0px");
     29 test_computed_value("line-height", "10px");
     30 test_computed_value("line-height", "0%", "0px");
     31 test_computed_value("line-height", "200%", "80px");
     32 test_computed_value("line-height", "calc(200% + 10px)", "90px");
     33 
     34 test_computed_value('line-height', 'calc(10px - 0.5em)', '0px');
     35 test_computed_value('line-height', 'calc(10px + 0.5em)', '30px');
     36 
     37 test_computed_value("line-height", 'calc(10 + (sign(2cqw - 10px) * 5))', '200px');
     38 test_computed_value("line-height", 'calc(10% + (sign(2cqw - 10px) * 5%))', '2px');
     39 test_computed_value("line-height", 'calc(10px + (sign(2cqw - 10px) * 5px))', '5px');
     40 </script>
     41 </body>
     42 </html>