Skip to content

Commit 1ebb70b

Browse files
committed
[css-flexbox] Fix dholbert's issue with items that'll get clamped past their base size causing bad free space calculations.
--HG-- extra : rebase_source : 5c8149f49a7c1a90f7a9e716daddfdd0c5239fef
1 parent d39e38f commit 1ebb70b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

css-flexbox/Overview.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,6 +2333,13 @@ Resolving Flexible Lengths</h3>
23332333
for all other items,
23342334
both flexible and inflexible,
23352335
use their outer <a>flex base size</a>.
2336+
If the <i>flex grow factor</i> is being used for this algorithm,
2337+
clamp the items’ <a>flex base size</a>
2338+
by their max main size;
2339+
if the <i>flex shrink factor</i> is being used for this algorithm,
2340+
clamp the items’ <a>flex base size</a>
2341+
by the min main size.
2342+
23362343
Subtract this sum from the flex container's inner main size.
23372344
This is the free space.
23382345

css-flexbox/Overview.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,8 +2360,15 @@ <h3 class="heading settled heading" data-level=9.7 id=resolve-flexible-lengths><
23602360
for all other items,
23612361
both flexible and inflexible,
23622362
use their outer <a data-link-type=dfn href=#flex-base-size title="flex base size">flex base size</a>.
2363-
Subtract this sum from the flex container’s inner main size.
2364-
This is the free space.
2363+
If the <a data-link-type=dfn href=#flex-grow-factor title="flex grow factor">flex grow factor</a> is being used for this algorithm,
2364+
clamp the items’ <a data-link-type=dfn href=#flex-base-size title="flex base size">flex base size</a>
2365+
by their max main size;
2366+
if the <a data-link-type=dfn href=#flex-shrink-factor title="flex shrink factor">flex shrink factor</a> is being used for this algorithm,
2367+
clamp the items’ <a data-link-type=dfn href=#flex-base-size title="flex base size">flex base size</a>
2368+
by the min main size.
2369+
2370+
<p>Subtract this sum from the flex container’s inner main size.
2371+
This is the free space.</p>
23652372

23662373
<li>
23672374
<strong>Calculate desired free space.</strong>

0 commit comments

Comments
 (0)