tor-browser

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

multicol-dynamic-add-001.html (1461B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3  <meta charset="utf-8">
      4  <title>CSS Multi-column Layout Test: Append a block to an empty inline element</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/#cf">
      8  <link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level">
      9  <link rel="match" href="multicol-dynamic-add-001-ref.html">
     10  <meta name="assert" content="This test checks that the block appended into an inline element should perform correct block-in-inline splitting, and balance the block's height into three columns.">
     11 
     12  <script>
     13  function runTest() {
     14    document.body.offsetHeight;
     15 
     16    /* Append a block to the inline element. */
     17    var block = document.createElement("div");
     18    var text = document.createTextNode("block");
     19    block.appendChild(text);
     20 
     21    var span = document.getElementById("span");
     22    span.appendChild(block);
     23 
     24    document.documentElement.removeAttribute("class");
     25  }
     26  </script>
     27 
     28  <style>
     29  #column {
     30    column-count: 3;
     31    column-rule: 6px solid;
     32    width: 400px;
     33    outline: 1px solid black;
     34  }
     35  div {
     36    height: 300px;
     37    background-color: yellow;
     38  }
     39  </style>
     40 
     41  <body onload="runTest();">
     42    <article id="column">
     43      <span id="span"><!-- block will be added here. --></span>
     44    </article>
     45  </body>
     46 </html>