-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Nodes are not constrained to container #7946
Comments
Not sure if this is a regression or user-error, but this behaved "as expected" in Bevy 0.9. In html/css, this sort of thing seems to behave like bevy 0.9, so probably a regression. |
I cannot reproduce this in Taffy. Using the following HTML: <div id="test-root" style="width: 320px; height: 300px;margin: auto;padding: 20px;flex-direction: column;">
<div style="width: 100%;height: 70px;justify-content: center;align-items: center;">
<div style="width: 100%;height: 100%;"></div>
<div style="width: 100%;height: 100%;margin-left: 10px"></div>
</div>
</div> I get the following rendering in Chrome: And the Taffy gentest passes with the following output:
Possibly the issue could be somewhere in the code that interfaces with Taffy in Bevy? P.S. with the latest bevy you can set |
Thanks for the analysis! Looks like you're right.
Looking forward to it, but needed to test Bevy 0.9 as well. |
Side note: I am surprised that we don't have a built-in example that exhibits this bug. They all look okay. |
I'm not so surprised. It only exhibits because you're relying on shrinking (and setting the |
I guess it's not surprising that we don't have the same exact bug described above. But if both Just in case it's useful for someone else finding this bug, I was able to work around this issue in my case by
|
# Objective Add a simple example demonstrating how to use size constraints. Related to #7946 # Solution <img width="827" alt="Capture" src="https://user-images.githubusercontent.com/27962798/223741566-4b8eca99-c450-42b5-a40e-a414858c8310.PNG"> # Changelog * Added the example `size_constraints`
Bevy version
0.10, main
bisected to 76058bc
Relevant system information
scale_factor
is2.
, but the behavior is the same when overridden to1.
What you did
What went wrong
Post-Taffy-3
![image](https://user-images.githubusercontent.com/200550/223443655-65963870-d563-4652-a0be-dd2420188ef1.png)
Pre-Taffy-3 and 0.9 (what I expected)
![image](https://user-images.githubusercontent.com/200550/223444988-f2bd643c-f978-401b-809e-ed669130e386.png)
The text was updated successfully, but these errors were encountered: