render: honor container item alignment

This commit is contained in:
SGavrl committed 2026-07-23 16:49:22 +00:00
1 parent 1387e7ffe4
commit 051e8e956e
2 files changed
+22 -7

No files matched your search

+2
View File
@@ -287,6 +287,7 @@ pub struct LayoutStyle {
/// one field for both made `text-align:left` shrink-wrap flex children.
pub text_align: Option<taffy::AlignItems>,
pub align_items: Option<taffy::AlignItems>,
pub justify_items: Option<taffy::JustifyItems>,
pub align_self: Option<taffy::AlignSelf>,
pub justify_self: Option<taffy::JustifySelf>,
pub flex_direction: Option<taffy::FlexDirection>,
@@ -719,6 +720,7 @@ pub(crate) fn to_taffy_style(style: &LayoutStyle) -> Style {
// `align-items` has no effect on a block formatting context.
s.align_items = None;
}
s.justify_items = style.justify_items;
s.align_self = style.align_self;
s.justify_self = style.justify_self;
if let Some(jc) = style.justify_content {