tor-browser

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

margin-collapse-vlr-017.xht (2072B)


      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: 'vertical-lr' and margin collapsing - elements with 'overflow' set to 'hidden'</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/#logical-direction-layout" title="7.4 Flow-Relative Mappings" />
     11   <link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
     12 
     13   <!--
     14   Test adapted and modified from
     15   http://test.csswg.org/suites/css2.1/nightly-unstable/html4/margin-collapse-009.htm
     16 
     17   "
     18   The margin collapsing rules apply exactly with the block-start margin substituted for the top margin and the block-end margin substituted for the bottom margin.
     19   "
     20   -->
     21 
     22   <meta content="ahem image" name="flags" />
     23   <meta name="assert" content="This test checks that elements with 'overflow' set to 'hidden' do not collapse margin with in-flow children in 'vertical-lr' writing-mode. In this test, we are testing and checking that 'margin-left' of div#overflow does not collapse with 'margin-left' of div#nested." />
     24 
     25   <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     26   <style type="text/css"><![CDATA[
     27   div
     28     {
     29       font: 25px/1em Ahem;
     30       height: 4em;
     31     }
     32 
     33   div#wrapper
     34     {
     35       background-color: green;
     36       width: 8em;
     37       writing-mode: vertical-lr;
     38     }
     39 
     40   div#overflow
     41     {
     42       background-color: white;
     43       margin-left: 4em; /* block-start margin of overflowed block */
     44       overflow: hidden;
     45       width: 4em;
     46     }
     47 
     48   div#nested
     49     {
     50       background-color: red;
     51       margin-left: 4em; /* block-start margin of sub-block */
     52       width: 4em;
     53     }
     54   ]]></style>
     55 
     56  </head>
     57 
     58  <body>
     59 
     60   <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     61 
     62   <div id="wrapper">
     63     <div id="overflow">
     64       <div id="nested"></div>
     65     </div>
     66   </div>
     67 
     68  </body>
     69 </html>