tor-browser

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

clearance-calculations-vrl-006.xht (2180B)


      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: Clearance calculations - clearing box has larger margin than width of float</title>
      8 
      9   <!--
     10   This test is the verticalized version of
     11   http://test.csswg.org/suites/css2.1/latest/html4/clear-clearance-calculation-003.htm
     12   -->
     13 
     14   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
     15   <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
     16   <link rel="match" href="clearance-calculations-vrl-006-ref.xht" />
     17 
     18   <meta content="ahem image" name="flags" />
     19   <meta content="This test checks that when a clearing element (in a block formating context with 'writing-mode' set to 'vertical-rl') has a right margin larger than the width of a floated element, then the right margin is collapsed with the margin-left of preceding in-flow sibling. The clearing element is then placed at the point of the resulting collapsed margin." name="assert" />
     20 
     21   <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     22   <style type="text/css"><![CDATA[
     23   div
     24     {
     25       height: 5em; /* computes to 100px */
     26     }
     27 
     28   div#parent
     29     {
     30       background: red url("support/clearance-calculation-vrl-006.png");
     31       font: 20px/1 Ahem; /* computes to 20px/20px */
     32       min-width: 7em;
     33       writing-mode: vertical-rl;
     34     }
     35 
     36   div > div
     37     {
     38       background-color: green;
     39       width: 1em;
     40     }
     41 
     42   div#preceding-sibling
     43     {
     44       margin-left: 1em;
     45     }
     46 
     47   div#floated-left
     48     {
     49       float: left;
     50     }
     51 
     52   div#clearing-left /* collapsing-through element */
     53     {
     54       clear: left;
     55       margin-left: 4em;
     56       margin-right: 5em;
     57       width: 0em;
     58     }
     59   ]]></style>
     60 
     61  </head>
     62 
     63  <body>
     64 
     65   <p>Test passes if there is <strong>no red</strong>.</p>
     66 
     67   <div id="parent">
     68     <div id="preceding-sibling"></div>
     69     <div id="floated-left"></div>
     70     <div id="clearing-left"></div>
     71     <div id="following-sibling"></div>
     72   </div>
     73 
     74  </body>
     75 </html>