Fix wrong min-width percentage calculation for child #1015
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #872 by using the correct parent values instead of the grandparents.
Unfortunately that fix reveals a bug which causes two existing tests to fail, which are false negatives.
percentage_flex_basis_cross_min_height
percentage_flex_basis_main_min_width
The underlying bug is a misbehavior from the specs (https://www.w3.org/TR/css-flexbox-1/#algo-main-item).
Sadly the current algorithm takes the clamping into account. As the generated tests also have changed based on using the latest (83) chrome, it also looks that this has been a previous bug in chrome, too.
Despite the fact this PR is still valid, it just reveals another existing bug. But as Yoga does not apply to the web basis specs all together I suggest having this fix in place instead of using the wrong values for calculation. As the underlying bug (including min values for flex basis) is more predictable.
I also moved one of the tests to a different file to not get overridden by the generator.
@SidharthGuglani I highly appreciate your opinion on that one.
@emilsjolander I know it's a long time, maybe you have an idea here, too. Perhaps I also have an oversight here.