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
This is related to the following comment on #1194, but I'm creating a separate issue because I think it's a bug rather than an enhancement.
To support center alignment here, we would need an equivalent to CSS align-self. Its default value is taken from align-items on the parent, and the default value of that is stretch, which is consistent with the current behavior: the button fills the available width.
Where I think we diverge from CSS is the way we implement alignment, which #1778 maps to align-items. If I take the second example and setalignment to left, center or right on the column box, it makes no difference: the children continue to be stretched to the full width.
A lot has changed in this area in the last 6 months, but I'm still seeing some inconsistencies in whether widgets are stretched in the cross axis.
The cyan box is a child of a top-level COLUMN, and it's being stretched to fill the cross axis.
The orange box is a child of a second-level ROW, but it's not being stretched in the cross axis, which is why it's collapsing to nothing.
From experimentation, I think this is down to whether the container's cross-axis size is externally-determined, or if it's shrinking to fit its content. For example, if you add either height=150 orflex=1 to the ROW box, then the orange box will appear. And of course, the top-level COLUMN box's size is determined by the window.
If I understand correctly, whether a child is stretched to fit the extra cross-axis space should not be affected by how that space was determined. It should stretch whenever it's able, or if it's unable, it should be positioned according to the alignment property.
Describe the bug
This is related to the following comment on #1194, but I'm creating a separate issue because I think it's a bug rather than an enhancement.
A lot has changed in this area in the last 6 months, but I'm still seeing some inconsistencies in whether widgets are stretched in the cross axis.
The cyan box is a child of a top-level COLUMN, and it's being stretched to fill the cross axis.
The orange box is a child of a second-level ROW, but it's not being stretched in the cross axis, which is why it's collapsing to nothing.
From experimentation, I think this is down to whether the container's cross-axis size is externally-determined, or if it's shrinking to fit its content. For example, if you add either
height=150
orflex=1
to the ROW box, then the orange box will appear. And of course, the top-level COLUMN box's size is determined by the window.If I understand correctly, whether a child is stretched to fit the extra cross-axis space should not be affected by how that space was determined. It should stretch whenever it's able, or if it's unable, it should be positioned according to the
alignment
property.Environment
The text was updated successfully, but these errors were encountered: