tor-browser

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

multicol-span-all-dynamic-add-005.html (1492B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3  <meta charset="utf-8">
      4  <title>CSS Multi-column Layout Test: Add block1 before block2. It should join the column content box with
      5    block2, not with the spanner</title>
      6  <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
      7  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
      8  <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
      9  <link rel="match" href="multicol-span-all-dynamic-add-001-ref.html">
     10  <meta name="assert" content="This test checks a dynamically added block element should be rendered correctly in a column hierarchy containing a column-span.">
     11 
     12  <script>
     13  function runTest() {
     14    document.body.offsetHeight;
     15 
     16    /* Add block1 before block2. It should join the column content box with
     17       block2, not with the spanner. */
     18    var block = document.createElement("div");
     19    var text = document.createTextNode("block1");
     20    block.appendChild(text);
     21 
     22    var column = document.getElementById("column");
     23    column.insertBefore(block, column.children[1]);
     24 
     25    document.documentElement.removeAttribute("class");
     26  }
     27  </script>
     28 
     29  <style>
     30  #column {
     31    column-count: 3;
     32    column-rule: 6px solid;
     33    width: 400px;
     34    outline: 1px solid black;
     35  }
     36  h3 {
     37    column-span: all;
     38    outline: 1px solid blue;
     39  }
     40  </style>
     41 
     42  <body onload="runTest();">
     43    <article id="column">
     44      <h3>spanner</h3>
     45      <div>block2</div>
     46    </article>
     47  </body>
     48 </html>