Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

min-width in percent isn't calculated against parent node #872

Open
1 task done
vadimdemedes opened this issue Mar 18, 2019 · 1 comment · May be fixed by #1015
Open
1 task done

min-width in percent isn't calculated against parent node #872

vadimdemedes opened this issue Mar 18, 2019 · 1 comment · May be fixed by #1015

Comments

@vadimdemedes
Copy link

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

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

https://codesandbox.io/s/vv0rlkokz7

@woehrl01
Copy link
Contributor

Hi @vadimdemedes,

thanks for reporting that bug, I just pushed a PR for the fix. Unfortunately that fix reveals a previous bug by failing other unit tests. Let's see how the current maintainer decide on having this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants