tor-browser

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

vars-font-shorthand-001.html (1296B)


      1 <!DOCTYPE html>
      2 <title>CSS Variables 1: Test variables in @font-face, font-family, font shorthand.</title>
      3 <link rel="author" title="Lea Verou" href="mailto:lea@verou.me">
      4 <link rel="help" href="https://www.w3.org/TR/css-variables-1/#variables-in-shorthands">
      5 <link rel="match" href="reference/vars-font-shorthand-001-ref.html">
      6 <meta name="flags" content="ahem">
      7 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
      8 <style>
      9 
     10 div {
     11    width: 150px;
     12    height: 150px;
     13    margin: 10px;
     14    display: inline-block;
     15    vertical-align: middle;
     16    background: red;
     17    text-align: center;
     18    color: green;
     19    overflow: hidden;
     20 }
     21 
     22 div#d1 {
     23    --foo: Ahem;
     24    font-family: var(--foo);
     25    font-size: 150px;
     26    line-height: 1;
     27 }
     28 
     29 div#d2 {
     30    --foo: 0 Ahem;
     31    font: var(--foo);
     32    font-size: 150px;
     33    line-height: 150px;
     34 }
     35 
     36 div#d3 {
     37    --foo: Ahem, sans-serif;
     38    font: 150px/1 var(--foo);
     39 }
     40 
     41 div#d4 {
     42    --foo: Ahem;
     43    font: 150px/1 var(--foo), sans-serif;
     44 }
     45 
     46 div#d5 {
     47    --foo: 1 Ahem;
     48    font: 150px/var(--foo);
     49 }
     50 
     51 div#d6 {
     52    --foo: 150px/1 Ahem;
     53    font: var(--foo);
     54 }
     55 </style>
     56 <p>Test passes if you see six green squares, and no red.</p>
     57 <div id="d1">X</div>
     58 <div id="d2">X</div>
     59 <div id="d3">X</div>
     60 <div id="d4">X</div>
     61 <div id="d5">X</div>
     62 <div id="d6">X</div>