multicol-span-all-children-height-004a.html (1802B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Multi-column Layout Test: Test the block-size distribution across column-span split in a balancing multicol container</title> 5 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 6 <link rel="author" title="Mozilla" href="https://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-children-height-004a-ref.html"> 9 <meta name="assert" content="This test verifies that a block container with a fixed block-size, split by column-span, distributes just enough block-size to hold its children."> 10 11 <style> 12 article { 13 column-count: 2; 14 width: 400px; 15 background-color: lightgreen; 16 } 17 div.container { 18 height: 450px; 19 background-color: pink; 20 } 21 div.block { 22 width: 100px; 23 height: 200px; 24 background-color: yellow; 25 } 26 div.column-span { 27 column-span: all; 28 height: 50px; 29 background-color: lightblue; 30 } 31 </style> 32 33 <article> 34 <!-- The container is split by the column-spans. 35 a) Before column-span1, it distributes 200px height into two columns, 36 and each column takes 100px height. 37 b) In between column-span1 and column-span2, same distribution as a). 38 c) After column-span2, it has 50px height left, which goes to the first 39 column. 40 --> 41 <div class="container"> 42 <!-- Each block spreads its height evenly into two columns, and 43 each column contains 100px height. --> 44 <div class="block">block1</div> 45 <div class="column-span">column-span1</div> 46 <div class="block">block2</div> 47 <div class="column-span">column-span2</div> 48 <div class="block">block3</div> 49 </div> 50 </article> 51 </html>