tor-browser

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

white-space-pre-011.html (1596B)


      1 <!DOCTYPE html>
      2 
      3  <meta charset="UTF-8">
      4 
      5  <title>CSS Text: 'white-space: pre' (basic)</title>
      6 
      7  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
      8  <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property">
      9  <link rel="match" href="reference/white-space-pre-011-ref.html">
     10 
     11  <style>
     12  div
     13    {
     14      border: black solid 2px;
     15      font-family: monospace;
     16      font-size: 32px;
     17      margin-bottom: 0.25em;
     18      width: 16ch;
     19    }
     20 
     21  div#test
     22    {
     23      white-space: pre;
     24    }
     25 
     26  div#reference
     27    {
     28      white-space: normal;
     29    }
     30  </style>
     31 
     32  <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. Only "Dolor" should be outside of black-bordered rectangles.
     33 
     34  <div id="test">Lorem ipsum.        Dolor
     35   sit&Tab;amet. <br>consectetur</div>
     36 
     37  <div id="reference">Lorem&nbsp;ipsum.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dolor<br>
     38 &nbsp;&nbsp;&nbsp;sit&nbsp;&nbsp;amet.&nbsp;<br>
     39 consectetur</div>
     40 
     41 <!--
     42 
     43  <div id="test">Lorem ipsum.        Dolor
     44                             ^^^^^^^^
     45                             12345678
     46 
     47   sit&Tab;amet. <br>consectetur</div>
     48 ^^^
     49 123
     50 
     51 Since 'tab-size' is by default 8,
     52 since "sit" uses 3 characters
     53 and since there are 3 white space characters
     54 before "sit", then
     55 
     56  8
     57 -
     58  3
     59 -
     60  3
     61 =====
     62  2
     63 
     64 then the horizontal tabulation will be use as much space
     65 as a sequence of 2 preserved white space characters.
     66 
     67 
     68  &Tab; == Horizontal tabulation == &#x0009; == &#09;
     69 
     70  &NewLine; == Line feed == &#x000A; == &#0010;
     71 
     72 -->