tor-browser

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

cap-unit-001.html (1007B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Values and Units Test: support for the cap unit</title>
      4 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-values-4/#font-relative-lengths">
      6 <link rel="match" href="reference/cap-unit-001-ref.html">
      7 <meta name="assert" content="The cap unit is equal to the used cap-height of the first available font.">
      8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
      9 <style>
     10 span {
     11    background: green;
     12    color: green;
     13    position: absolute;
     14 }
     15 div {
     16    font: 50px Ahem; /* cap-height of Ahem is 0.8em */
     17    background: red;
     18    position: relative;
     19    height: 180px;
     20    height: calc(180px - 2cap);  /* reduce to 100px if cap correctly supported */
     21    width: 100px;
     22 }
     23 
     24 div span {
     25    width: 2.5cap;
     26    height: 100px;
     27 }
     28 </style>
     29 <body>
     30    <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
     31    <div><span></span></div>
     32 </body>