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

Open
opened 2019-03-17 21:49:09 -07:00 by vadimdemedes · 1 comment
vadimdemedes commented 2019-03-17 21:49:09 -07:00 (Migrated from github.com)

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

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](https://github.com/vadimdemedes/ink) is a very happy user! # Report - [x] I have searched [existing issues](https://github.com/facebook/yoga/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 https://codesandbox.io/s/vv0rlkokz7
woehrl01 commented 2020-06-11 08:05:32 -07:00 (Migrated from github.com)

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.

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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#872
No description provided.