tor-browser

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

ic-unit-014.html (1208B)


      1 <!DOCTYPE html>
      2 
      3 <meta charset="utf-8">
      4 <title>CSS Values and Units Test: support for the ic unit</title>
      5 <link rel="author" title="Kiet Ho" href="mailto:tho22@apple.com">
      6 <link rel="help" href="https://www.w3.org/TR/css-values-4/#ic">
      7 <link rel="match" href="reference/ic-unit-014-ref.html">
      8 <meta name="assert" content="The ic unit is equal to 0.5em if the CJK water glyph's advance is 0.5em.">
      9 <style>
     10 /* The following font contains the CJK water (U+6C34) glyph as a rectangle box,
     11   with the width being exactly half of its height. */
     12 @font-face {
     13  font-family: IcTestHalfWidth;
     14  src: url(resources/IcTestHalfWidth.woff2);
     15 }
     16 
     17 .test {
     18    font-family: IcTestHalfWidth;
     19    font-size: 20px;
     20    width: calc(100px + 10ic);
     21    height: 20px;
     22    background: green;
     23    margin-bottom: 10px;
     24 }
     25 
     26 .ref {
     27    /*
     28    Each ic is equal to 10px, the width of a CJK water glyph.
     29    (its height is 20px, and its width is half the height).
     30    The width of .test is then:
     31        100px + (10ic * 10px / ic) = 200px
     32    */
     33    width: 200px;
     34    height: 20px;
     35    background: green;
     36 }
     37 </style>
     38 
     39 <p>The test passes if there are two green rectangles of equal length.</p>
     40 <div class="test"></div>
     41 <div class="ref"></div>