min-width in percent isn't calculated against parent node
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
It seems that Yoga doesn't calculate min-width against parent node's width. Interestingly it occurs only when using percentage, e.g. 50%.
P.S. Thank you for the amazing library! Ink is a very happy user!
Report
- I have searched existing issues and this is not a duplicate
Issues and Steps to Reproduce
See https://codesandbox.io/s/vv0rlkokz7 for reproduction. childNode's width should be half of parentNode's width, but it seems to be half of rootNode's width for some reason.
Expected Behavior
It should calculate 50% min-width against parent node's width.
Actual Behavior
It calculates min-width against root node.
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 CodeSandbox reproduction linked in the issue and trace how the child node's percentage min-width is calculated relative to its parent and root. The fix is complete when the child node's 50% min-width is based on the parent node's width and the reproduction behaves as expected.
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