Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox: items after an item that overflows the line on its own</title>
<link rel="match" href="balance-line-break-overflowing-item-ref.html">
<meta name="assert" content="Items following an item that overflows the line on its own can still share a line when there is a main axis gap.">
<style>
#balanced {
display: flex;
flex-wrap: balance;
width: 100px;
column-gap: 10px;
row-gap: 10px;
}
#balanced > div {
height: 20px;
background: green;
flex-shrink: 0;
}
</style>
<p>Test passes if there are three green rows and the last one holds two separate squares.</p>
<div id="balanced">
<div style="width: 50px"></div>
<div style="width: 300px"></div>
<div style="width: 20px"></div>
<div style="width: 20px"></div>
</div>