Skip to content

Commit 55353d2

Browse files
committed
add an issue on negative flexiblity, with proportinoal formula
1 parent 7d17315 commit 55353d2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

css3-flexbox/Overview.src.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,29 @@ <h3 id='resolve-flexible-lengths'>
17041704
distribute the free space to each flexible item's main size
17051705
in proportion to the item's flexibility.
17061706

1707+
<div class="issue">
1708+
<p>Growing and shrinking from flex basis should use different
1709+
formulas for space distribution.</p>
1710+
1711+
<p>Grow proportional to <em>
1712+
flexibility</em>. Items with equal flexibility grow by same
1713+
absolute amount.</p>
1714+
<pre>
1715+
free-space = available-space - sum(flex-basis)
1716+
main-size = flex-basis + free-space * positive-flex / sum(positive-flex)</pre>
1717+
1718+
<p>Shrink proportional to its <em>
1719+
flexibility and flex-basis.</em> Items with same flexibility maintain
1720+
same relative size while shrinking.</p>
1721+
<pre>
1722+
space-shortage = sum(flex-basis) - available-space
1723+
shrink-factor = space-shortage / sum(flex-basis * negative-flex))
1724+
main-size = flex-basis * (1 - shrink-factor * negative-flex))</pre>
1725+
<p>
1726+
See <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16856">
1727+
Bug 16856</a> </p>
1728+
</div>
1729+
17071730
<li>
17081731
<strong>Fix min/max violations.</strong>
17091732
Clamp each item's main size by its min and max main size properties.

0 commit comments

Comments
 (0)