Fix justify content with min/max constraint parent

Summary:
The min/max inner width shouldn't take the margins into account.
Adds a test for both cases.

Fixes #664
Closes https://github.com/facebook/yoga/pull/665

Differential Revision: D6407982

Pulled By: emilsjolander

fbshipit-source-id: ffa549a06f802263e3b8488e90756aa3f722d52d
This commit is contained in:
Lukas Wöhrl
2017-11-24 07:06:16 -08:00
committed by Facebook Github Bot
parent 0b13a0c168
commit a69545a6ae
6 changed files with 700 additions and 4 deletions

View File

@@ -57,3 +57,19 @@
<div style="height: 10px;"></div>
<div style="height: 10px;"></div>
</div>
<div id="justify_content_row_min_width_and_margin" style="min-width: 50px; margin-left: 100px; justify-content: center; flex-direction: row;">
<div style="height: 20px; width: 20px;"></div>
</div>
<div id="justify_content_row_max_width_and_margin" style="width: 100px; max-width: 80px; margin-left: 100px; justify-content: center; flex-direction: row;">
<div style="height: 20px; width: 20px;"></div>
</div>
<div id="justify_content_column_min_height_and_margin" style="min-height: 50px; margin-top: 100px; justify-content: center; flex-direction: column;">
<div style="height: 20px; width: 20px;"></div>
</div>
<div id="justify_content_colunn_max_height_and_margin" style="height: 100px; max-height: 80px; margin-top: 100px; justify-content: center; flex-direction: column;">
<div style="height: 20px; width: 20px;"></div>
</div>