@@ -2531,30 +2531,30 @@ <h3 id=resolve-flexible-lengths><span class=secno>9.7. </span> Resolving
25312531 < li > < strong > Distribute free space proportional to flexibility.</ strong >
25322532 If the sign of the free space matches the sign of the flexibility,
25332533 distribute the free space to each flexible item's main size in proportion
2534- to the item's flexibility.
2535- < div class = issue >
2536- < p > Growing and shrinking from flex basis should use different formulas
2537- for space distribution. </ p >
2538-
2539- < p > Grow proportional to < em > flexibility </ em > . Items with equal
2540- flexibility grow by same absolute amount. </ p >
2541-
2542- < pre >
2543- free-space = available- space - sum(flex-basis)
2544- main-size = flex-basis + free-space * positive-flex / sum(positive-flex) </ pre >
2545-
2546- < p > Shrink proportional to its < em > flexibility and flex-basis. </ em >
2547- Items with same flexibility maintain same relative size while
2548- shrinking. </ p >
2549-
2550- < pre >
2551- space-shortage = sum(flex-basis) - available-space
2552- shrink-factor = space-shortage / sum(flex-basis * negative- flex))
2553- main-size = flex-basis * (1 - shrink-factor * negative-flex)) </ pre >
2554-
2555- < p > See < a href ="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16856 " >
2556- Bug 16856 </ a > </ p >
2557- </ div >
2534+ to the item's flexibility:
2535+ < dl >
2536+ < dt > If the flexibility is positive
2537+
2538+ < dd > Find the ratio of the item's < a
2539+ href =" #positive-flexibility " > < i > positive flex ratio </ i > </ a > to the sum
2540+ of the < a href =" #positive-flexibility " > < i > positive flex ratios </ i > </ a >
2541+ of all items on the line. Set the item's main size to its < a
2542+ href =" #flex-basis " > < i > flex basis </ i > </ a > plus a fraction of the free
2543+ space proportional to the ratio.
2544+
2545+ < dt > If the flexibility is negative
2546+
2547+ < dd > For every item on the line, multiple its < a
2548+ href =" #negative-flex-ratio " > < i > negative flex ratio </ i > </ a > by its < a
2549+ href =" #flex-basis " > < i > flex basis </ i > </ a > , and note this as its < dfn
2550+ id = scaled-negative-flex-ratio > scaled negative flex ratio </ dfn > . Find
2551+ the ratio of the item's < a href =" #scaled-negative-flex-ratio " > < i > scaled
2552+ negative flex ratio </ i > </ a > to the sum of the < a
2553+ href =" #scaled- negative-flex-ratio " > < i > scaled negative flex
2554+ ratios </ i > </ a > of all items on the line. Set the item's main size to
2555+ its < a href ="#flex-basis " > < i > flex basis </ i > </ a > minus a fraction of the
2556+ free space proportional to the ratio.
2557+ </ dl >
25582558
25592559 < li > < strong > Fix min/max violations.</ strong > Clamp each item's main size
25602560 by its min and max main size properties. If the item's main size was made
@@ -3444,6 +3444,9 @@ <h2 class=no-num id=index>Index</h2>
34443444 class =css > row-reverse</ code > </ a > ’, < a href ="#flex-flow-row-reverse "
34453445 title ="''row-reverse'' "> < strong > 6.1.</ strong > </ a >
34463446
3447+ < li > scaled negative flex ratio, < a href ="#scaled-negative-flex-ratio "
3448+ title ="scaled negative flex ratio "> < strong > 9.7.</ strong > </ a >
3449+
34473450 < li > single-line, < a href ="#single-line "
34483451 title =single-line > < strong > 5.</ strong > </ a >
34493452
0 commit comments