tor-browser

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

multicol-span-all-dynamic-add-011.html (1682B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3  <meta charset="utf-8">
      4  <title>CSS Multi-column Layout Test: Insert a block containing a spanner kid. The spanner kid should correctly span across all columns</title>
      5  <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
      6  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
      7  <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
      8  <link rel="match" href="multicol-span-all-dynamic-add-003-ref.html">
      9  <meta name="assert" content="This test checks that an inserted block containing 'column-span' element should be rendered correctly.">
     10 
     11  <script>
     12  function runTest() {
     13    document.body.offsetHeight;
     14 
     15    // Create a subtree like the following, and insert it into column as the
     16    // first child.
     17    // <div>
     18    //   block1
     19    //   <h3>spanner</h3>
     20    // </div>
     21    var spanner = document.createElement("h3");
     22    var spannerText = document.createTextNode("spanner");
     23    spanner.appendChild(spannerText);
     24 
     25    var block1 = document.createElement("div");
     26    var block1Text = document.createTextNode("block1");
     27    block1.appendChild(block1Text)
     28    block1.appendChild(spanner);
     29 
     30    var column = document.getElementById("column");
     31    column.insertBefore(block1, column.children[0]);
     32 
     33    document.documentElement.removeAttribute("class");
     34  }
     35  </script>
     36 
     37  <style>
     38  #column {
     39    column-count: 3;
     40    column-rule: 6px solid;
     41    width: 400px;
     42    outline: 1px solid black;
     43  }
     44  h3 {
     45    column-span: all;
     46    outline: 1px solid blue;
     47  }
     48  </style>
     49 
     50  <body onload="runTest();">
     51    <article id="column">
     52      <div>block2</div>
     53    </article>
     54  </body>
     55 </html>