Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix align-content of cross-stretched container (facebook#1524)
Summary: D52087013 (facebook#1513) fixed some issues, including where measuring under max-content or fit-content, align-content stretch would consume the entire available cross-dimensions, instead of only sizing to definite dimension, like the spec dicates. I missed a case, where flexbox considers a container as having a definite cross-size if it is being stretched, even if it doesn't have a definite length. https://www.w3.org/TR/css-flexbox-1/#definite-sizes > 3. Once the cross size of a flex line has been determined, items in auto-sized flex containers are also considered definite for the purpose of layout; > 1. If a single-line flex container has a definite cross size, the outer cross size of any stretched flex items is the flex container’s inner cross size (clamped to the flex item’s min and max cross size) and is considered definite. We handle `align-items: stretch` of a flex container after cross-size determination by laying out the child under stretch-fit (previously YGMeasureModeExactly) constraint. This checks that case, and sizing the line container to specified cross-dim if we are told to stretch to it. We could probably afford to merge this a bit with later with what is currently step 9, where we end up redoing some of this same math. Reviewed By: yungsters Differential Revision: D52234980
- Loading branch information