floats-and-text-narrow-and-short-dynamic.html (917B)
1 <!DOCTYPE html> 2 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 3 <link rel="help" href="https://www.w3.org/TR/css-break-3/#parallel-flows"> 4 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=961516"> 5 <link rel="match" href="floats-and-text-narrow-and-short-dynamic-ref.html"> 6 <style> 7 #container { 8 columns: 4; 9 height: 2em; 10 column-fill: auto; 11 column-gap: 0; 12 line-height: 2em; 13 background: yellow; 14 } 15 16 .float { 17 float: left; 18 width: 2em; 19 height: 2em; 20 break-inside: avoid; 21 background: blue; 22 } 23 </style> 24 <p>Below there should be two yellow and two blue squares.</p> 25 <div id="container"> 26 <div style="width:1em;"> 27 <div style="height:1em;"></div> 28 <div class="float"></div> 29 30 <div class="float"></div> 31 </div> 32 </div> 33 <script> 34 document.body.offsetTop; 35 container.style.width = "8em"; 36 </script>