Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<link rel="match" href="balance-complex-ref.html">
<meta name="assert" content="Tests balancing a non-trivial amount of items. All implementations should be minimizing the sum of the squared error, and have the same rendering.">
<style>
#flex {
display: flex;
flex-wrap: balance;
width: 250px;
padding: 10px;
gap: 10px;
}
#flex > div {
height: 20px;
background: green;
}
</style>
<div id="flex">
<div style="width: 100px;"></div>
<div style="width: 20px;"></div>
<div style="width: 40px;"></div>
<div style="width: 70px;"></div>
<div style="width: 20px;"></div>
<div style="width: 10px;"></div>
<div style="width: 250px;"></div>
<div style="width: 20px;"></div>
<div style="width: 50px;"></div>
<div style="width: 65px;"></div>
<div style="width: 50px;"></div>
<div style="width: 55px;"></div>
<div style="width: 50px;"></div>
<div style="width: 50px;"></div>
<div style="width: 90px;"></div>
<div style="width: 50px;"></div>
<div style="width: 20px;"></div>
<div style="width: 20px;"></div>
<div style="width: 50px;"></div>
<div style="width: 50px;"></div>
<div style="width: 65px;"></div>
<div style="width: 65px;"></div>
<div style="width: 50px;"></div>
<div style="width: 150px;"></div>
<div style="width: 50px;"></div>
<div style="width: 50px;"></div>
</div>