tor-browser

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

ch-unit-016.html (990B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Values and Units Test: support for the ch 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/ch-unit-016-ref.html">
      7 <meta name="assert" content="The ch unit is equal to 0em if the zero glyph's advance is 0.">
      8 <style>
      9 @font-face {
     10  font-family: ChTestZeroWidthZero;
     11  src: url(resources/ChTestZeroWidthZero.woff);
     12 }
     13 div {
     14  height: 10px;
     15  background-color: blue;
     16  margin-top: 10px;
     17 }
     18 .test {
     19  width: calc(100px + 5ch);
     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 <!-- The '0' glyph in ChTestZeroWidthZero has a horizontal advance of
     27     zero, so ch units should compute to 0em, resulting in the div being
     28     100px wide. -->
     29 <div class="test" style="font: 20px ChTestZeroWidthZero;"></div>
     30 <div class="ref"></div>