Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<link rel="match" href="balance-002-ref.html">
<meta name="assert" content="Tests balancing of four items, which would typically wrap 3,1">
<style>
body {
height: 120px;
width: max-content;
border: solid 3px;
}
#flex {
display: flex;
flex-wrap: balance;
flex-direction: column;
padding: 10px;
gap: 10px;
height: 100%;
}
#flex > div {
width: 25px;
height: 25px;
background: green;
}
</style>
<div id="flex">
<div></div>
<div></div>
<div></div>
<div></div>
</div>