Flex shrink changes size with flex grow below 1
Open
Nobody has claimed this yet.
Algorithm
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Report
- I have searched existing issues and this is not a duplicate
Issues and Steps to Reproduce
Take a single child smaller than its parent. Add flex grow between 0 and 1 (0.5 for instance). Try to set flex shrink to 0 or 1.
Expected Behavior
Same result with 0 or 1: flex shrink should have no impact on the child size since there is still unused space in the parent.
Actual Behavior
Not the same result.
Link to Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction and trace Yoga's flex layout handling for a single child with unused parent space, flex grow below 1, and flex shrink set to 0 or 1. Compare the computed child sizes and add or update a focused regression test; done means both shrink values produce the same size in this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100