-
Notifications
You must be signed in to change notification settings - Fork 104
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
Auto-sizing doesn't work if children have only min_height
.
#591
Comments
I am unable to reproduce this. The following HTML snippet causes the outer div to have a height of 90px on both web and with Taffy: <div id="test-root" style="display: flex; flex-direction: column; width: 50px;">
<div style="min-height: 20px;"></div>
<div style="min-height: 30px;"></div>
<div style="min-height: 40px;"></div>
</div> |
Well, I can certainly reproduce it. Did you get a chance to try the minimal example I posted? |
Oh sorry, I completely missed that you'd posted a code example. I will check it out. |
I briefly looking into this, and I was able to reproduce the issue using your provided bevy sample. But I was not able to reproduce the issue when translating it into a Taffy gentest. Will try to investigate this further when I get a chance. |
min_height
.min_height
.
I ran into a similar issue with taffy 0.5.2 on rust(also tried 0.3 which has the same issue) so I am posting on this ticket with my issue. The dump of the html code where the auto-sizing
ended up with the output taffy tree:
|
taffy
versionv0.3.18
Platform
Rust OS/X
What you did
In Bevy, I create a container element whose height is 'auto', and whose layout is a flex column. I then give it several children whose height is specified by
min_height
.What went wrong
I would expect the container to compute its height so as to fit all the children. Instead, the container height is minimal (only padding), and the children overflow the container.
However, if I change the children to have
height
instead ofmin_height
, it works correctly.Alternatively, if I add some text nodes inside the children, it also works correctly.
Additional information
Minimal example using Bevy: sizing_bug.rs.zip
The text was updated successfully, but these errors were encountered: