You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the parent's width is only 500px, both children can only take 250px to remain within the bounds of the parent element. This is exactly how Firefox & Chrome layout this combination in this HTML:
The text was updated successfully, but these errors were encountered:
thecodrr
changed the title
Align baseline tests are incorrect
Incorrect width of children when using align baseline and child in row as reference
Sep 3, 2023
Report
Issues and Steps to Reproduce
In the following test:
yoga/tests/YGAlignBaselineTest.cpp
Line 418 in 31b6c0d
The expected
left
position ofroot_child1_child1
is 500px while it should be 250px:yoga/tests/YGAlignBaselineTest.cpp
Lines 453 to 454 in 31b6c0d
Because its parent's (
root_child1
) width is 500px withflexDirection: row
and 2 children of width500px
each:yoga/tests/YGAlignBaselineTest.cpp
Lines 428 to 437 in 31b6c0d
Since the parent's width is only 500px, both children can only take 250px to remain within the bounds of the parent element. This is exactly how Firefox & Chrome layout this combination in this HTML:
Note: you'll have to use the DevTools to find the width of
root_child1_child0
androot_child1_child1
but it is 250px each.Expected Behavior
The width of
root_child1_child0
androot_child1_child1
should be 250px each.Actual Behavior
The width of
root_child1_child0
androot_child1_child1
is 500px each and overflows the parent.Link to Code
Here's a fiddle: https://jsfiddle.net/0pLaox48/
The text was updated successfully, but these errors were encountered: