Revert "Ensure that flex children adopt their parent's cross-axis min dimension."
This reverts commit b8316413b3
.
This was causing issues for existing components built with React
Native.. we need to investigate more in the future.
This commit is contained in:
@@ -505,9 +505,9 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth) {
|
||||
child = node->get_child(node->context, i);
|
||||
float nextContentDim = 0;
|
||||
|
||||
// If it's a flexible child, accumulate the size that the child potentially
|
||||
// contributes to the row
|
||||
if (isFlex(child)) {
|
||||
// It only makes sense to consider a child flexible if we have a computed
|
||||
// dimension for the node->
|
||||
if (!isUndefined(node->layout.dimensions[dim[mainAxis]]) && isFlex(child)) {
|
||||
flexibleChildrenCount++;
|
||||
totalFlexible += getFlex(child);
|
||||
|
||||
@@ -573,7 +573,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth) {
|
||||
if (!isUndefined(node->layout.dimensions[dim[mainAxis]])) {
|
||||
remainingMainDim = definedMainDim - mainContentDim;
|
||||
} else {
|
||||
remainingMainDim = boundAxis(node, mainAxis, fmaxf(mainContentDim, 0)) - mainContentDim;
|
||||
remainingMainDim = fmaxf(mainContentDim, 0) - mainContentDim;
|
||||
}
|
||||
|
||||
// If there are flexible children in the mix, they are going to fill the
|
||||
|
Reference in New Issue
Block a user