tor-browser

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

list-and-margin-collapse-002.html (1295B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Lists: test the margin collapse of marker</title>
      4 <link rel=help href="https://www.w3.org/TR/CSS22/generate.html#lists">
      5 <link rel="help" href="http://crbug.com/969741">
      6 
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 
     10 <div id="log"></div>
     11 
     12 <div id="target_with_marker" style="overflow:hidden; width:100px;">
     13  <div style="margin-bottom:100px;"></div>
     14  <div style="display:list-item; margin-left:100px; height:0px;"></div>
     15  <div style="margin-top:100px;"></div>
     16 </div>
     17 
     18 <div id="target_without_marker" style="overflow:hidden; width:100px;">
     19  <div style="margin-bottom:100px;"></div>
     20  <div style="display:list-item; margin-left:100px; list-style:none;"></div>
     21  <div style="margin-top:100px;"></div>
     22 </div>
     23 
     24 <script>
     25 test(function() {
     26  var height_with_marker = document.getElementById("target_with_marker").clientHeight;
     27  assert_equals(height_with_marker, 200, "Should not allow margin-collapsing through if list is with marker.");
     28  var height_without_marker = document.getElementById("target_without_marker").clientHeight;
     29  assert_equals(height_without_marker, 100, "Should allow margin-collapsing through if list is without marker.");
     30 }, "list and margin collapse");
     31 </script>