Files
sousa-gecko/testing/web-platform/tests/css/css-flexbox/balance/balance-complex-ref.html
T
Ian Kilpatrick f25551d607 Bug 2040082 [wpt PR 59909] - [flex-balance] Add test for non-trival balancing., a=testonly
Automatic update from web-platform-tests
[flex-balance] Add test for non-trival balancing.

See: https://drafts.csswg.org/css-flexbox-2/#algo-balance
"""
  Calling the difference between the line size and the flex container’s
  inner main size a sequence’s error, the sum of the squared error
  across all sequences is minimized.
"""

All implementations should minimize the sum of the squared error from
all lines. Due to this any non-trival set of items should result in the
exact same rendering between implementations.

Bug: 416755656
Change-Id: Ie42baf417157ef98445e74f6d963d409dd32d1ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7851357
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1630979}

--

wpt-commits: aa3d3d307944201b72f04e24fba50bd312a0cb85
wpt-pr: 59909
2026-05-19 08:26:27 +00:00

49 lines
1.4 KiB
HTML

<!DOCTYPE html>
<style>
#flex {
display: flex;
flex-wrap: wrap;
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="background: none; width: 110px;"></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="background: none; width: 85px;"></div>
<div style="width: 50px;"></div>
<div style="width: 55px;"></div>
<div style="width: 50px;"></div>
<div style="background: none; width: 65px;"></div>
<div style="width: 50px;"></div>
<div style="width: 90px;"></div>
<div style="width: 50px;"></div>
<div style="background: none; width: 30px;"></div>
<div style="width: 20px;"></div>
<div style="width: 20px;"></div>
<div style="width: 50px;"></div>
<div style="width: 50px;"></div>
<div style="background: none; width: 70px;"></div>
<div style="width: 65px;"></div>
<div style="width: 65px;"></div>
<div style="width: 50px;"></div>
<div style="width: 150px;"></div>
<div style="background: none; width: 90px;"></div>
<div style="width: 50px;"></div>
<div style="width: 50px;"></div>
</div>