tor-browser

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

ex-unit-002.html (1013B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Values and Units Test: support for the ex unit</title>
      4 <link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au">
      5 <link rel="help" href="https://drafts.csswg.org/css-values-3/#font-relative-lengths">
      6 <link rel="match" href="reference/ex-unit-002-ref.html">
      7 <meta name="assert" content="The ex unit equals the x-height of the first available font if it has reliable metrics for the x-height.">
      8 <style>
      9 @font-face {
     10  font-family: ExTest;
     11  src: url(resources/ExTest.woff);
     12 }
     13 div {
     14  height: 10px;
     15  background-color: blue;
     16  margin-top: 10px;
     17 }
     18 .test {
     19  width: 10ex;
     20 }
     21 .ref {
     22  width: 100px;
     23 }
     24 </style>
     25 <p>The test passes if there are two blue rectangles of equal length.</p>
     26 <!-- ExTest is a font whose OS/2 table's sxHeight field is set to an
     27     eighth of the font's units per em, so ex units should compute to
     28     0.125em, resulting in the div being 100px wide. -->
     29 <div class="test" style="font: 80px ExTest;"></div>
     30 <div class="ref"></div>