The total flex factores need to be a minimum of 1 if any

Summary:
The only thing I found in the spec for this change is the following. Not exactly sure if this is the thing this PR is about:

> For each flex item, subtract its outer flex base size from its max-content contribution size. If that result is not zero, divide it by (if the result was positive) its **flex grow factor floored at 1** or (if the result was negative) by its scaled flex shrink factor, having **floored the flex shrink factor at 1**. This is the item’s max-content flex fraction.

But at least it seems a required change.

Fixes facebook/yoga#566
Closes https://github.com/facebook/yoga/pull/572

Differential Revision: D5264388

Pulled By: emilsjolander

fbshipit-source-id: 0004d1c3b9bad070a98cd6766c1adc06a54475f8
This commit is contained in:
Lukas Wöhrl
2017-06-16 07:31:19 -07:00
committed by Facebook Github Bot
parent 6c67684fa6
commit ca2c607f90
6 changed files with 290 additions and 0 deletions

View File

@@ -35,3 +35,9 @@
<div style="flex-grow:1; flex-shrink:1;"></div>
</div>
</div>
<div id="flex_grow_less_than_factor_one" style="height: 500px; width: 200px; flex-direction:column;">
<div style="flex-grow:0.2; flex-shrink:0; flex-basis: 40px;"></div>
<div style="flex-grow:0.2; flex-shrink:0;"></div>
<div style="flex-grow:0.4; flex-shrink:0;"></div>
</div>