tor-browser

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

first-letter-width-2.html (1122B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <html lang="en">
      4 <head>
      5  <title>initial-letter width test</title>
      6  <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=362880">
      7  <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-styling">
      8  <link rel="match" href="first-letter-width-2-ref.html">
      9  <meta name="assert" content="The width of an element with first-letter styling should render correctly.">
     10  <style>
     11    html {
     12      overflow: scroll;
     13    }
     14    body {
     15      overflow: scroll;
     16    }
     17    div {
     18      position: relative;
     19    }
     20    span {
     21      position: absolute;
     22      color: transparent;
     23    }
     24    #control {
     25      background-color: green;
     26    }
     27    #test {
     28      background-color: red;
     29      line-height: 1;
     30      top: 1px;
     31    }
     32    #test::first-letter {
     33      text-transform: uppercase;
     34    }
     35  </style>
     36  <script>
     37    function run() {
     38      document.documentElement.style.overflow = "initial";
     39    }
     40  </script>
     41 </head>
     42 <body onload="run()">
     43  <p>There should be no red</p>
     44  <div>
     45  <span id="test">Test</span>
     46  <span id="control">Test.</span>
     47  </div>
     48 </body>
     49 </html>