tor-browser

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

percent-padding-vlr-003.xht (2381B)


      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      2 
      3 <html xmlns="http://www.w3.org/1999/xhtml">
      4 
      5  <head>
      6 
      7   <title>CSS Writing Modes Test: padding percentage and 'vertical-lr' (orthogonal flow)</title>
      8 
      9   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
     10   <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#dimension-mapping" title="7.2 Dimensional Mapping" />
     11   <link rel="match" href="margin-vrl-002-ref.xht" />
     12 
     13   <meta content="image" name="flags" />
     14   <meta content="This test checks that percentages on the padding are calculated with respect to the width (inline-size) of the containing block if 'writing-mode' of such containing block is 'horizontal-tb'. In this test, div.outer's computed 'writing-mode' value is 'horizontal-tb' and it is the div.inner's containing block." name="assert" />
     15 
     16   <style type="text/css"><![CDATA[
     17   div.outer
     18     {
     19       background-color: blue;
     20       border: blue solid 3px;
     21       width: 200px;
     22     }
     23 
     24   div.inner
     25     {
     26       background-color: transparent;
     27       height: 50px;
     28       writing-mode: vertical-lr;
     29     }
     30 
     31   div.foo
     32     {
     33       padding-bottom: 2.5%; /* 5px */
     34       padding-left: 50%; /* 100px */
     35       padding-right: 25%; /* 50px */
     36       padding-top: 10%; /* 20px */
     37     }
     38 
     39   hr
     40     {
     41       background-color: transparent;
     42       border: transparent none 0px;
     43       height: 3px;
     44       margin: 3px auto;
     45     }
     46 
     47   div.bar
     48     {
     49       padding-bottom: 10%; /* 20px */
     50       padding-left: 25%; /* 50px */
     51       padding-right: 50%; /* 100px */
     52       padding-top: 2.5%; /* 5px */
     53     }
     54 
     55   div#reference
     56     {
     57       margin-top: 1em;
     58     }
     59   ]]></style>
     60  </head>
     61 
     62  <body>
     63 
     64   <p>Test passes if there are 2 <strong>identical</strong> blue rectangles, each with 2 small yellow squares: the layout must be identical.</p>
     65 
     66   <div class="outer">
     67     <div class="inner foo"><img src="support/swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled" /></div>
     68     <hr />
     69     <div class="inner bar"><img src="support/swatch-yellow.png" width="50" height="50" alt="Image download support must be enabled" /></div>
     70   </div>
     71 
     72   <div id="reference"><img src="support/blue-yellow-206w-165h.png" width="206" height="165" alt="Image download support must be enabled" /></div>
     73 
     74  </body>
     75 </html>