tor-browser

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

font-size-adjust-010.html (1826B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Fonts Test: font-size-adjust - two-value syntax - using 'ch-width' as the basis for adjustment</title>
      4 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
      5 <link rel="help" title="2.6 Relative sizing: the font-size-adjust property"
      6      href="https://drafts.csswg.org/css-fonts-4/#font-size-adjust-prop">
      7 <link rel="help" title="extend font-size-adjust to take a pair of values: <metric> <number>"
      8      href="https://github.com/w3c/csswg-drafts/issues/6160">
      9 <meta name="assert" content="Test checks that font-size-adjust with the 'ch-width' metric works as expected">
     10 <link rel="match" href="font-size-adjust-009-ref.html">
     11 <meta name="fuzzy" content="maxDifference=0-130;totalPixels=0-350">
     12 <style>
     13  @font-face {
     14    font-family: test;
     15    src: url(/fonts/noto/noto-sans-v8-latin-regular.woff);
     16         /* this font has a 'zero' width (and therefore 'ch' unit) of 1128/2048 units */
     17  }
     18  div {
     19    clear: left;
     20    float: left;
     21    font: 56px/112px test;
     22    color: orange;
     23    background: orange;
     24  }
     25  #test1 {
     26    color: green;
     27    background: green;
     28    font-size-adjust: ch-width calc(1128 / 2048);  /* should cause no change */
     29  }
     30  #test2 {
     31    color: blue;
     32    background: blue;
     33    font-size-adjust: ch-width calc(1.5 * 1128 / 2048);  /* should be 1.5 times larger */
     34  }
     35  #test3 {
     36    color: magenta;
     37    background: magenta;
     38    font-size-adjust: ch-width calc(0.75 * 1128 / 2048);  /* should be 0.75 times larger */
     39  }
     40 </style>
     41 <body>
     42  <p>Test passes if the size of the green rectangle matches the orange rectangle,
     43     the blue rectangle is longer, and the magenta rectangle is shorter.</p>
     44  <div>Filler Text</div>
     45  <div id="test1">Filler Text</div>
     46  <div id="test2">Filler Text</div>
     47  <div id="test3">Filler Text</div>
     48 </body>