Skip to main content

GridItemStyle

Trait GridItemStyle 

pub trait GridItemStyle: CoreStyle {
    // Provided methods
    fn grid_row(&self) -> Line<GridPlacement<Self::CustomIdent>> { ... }
    fn grid_column(&self) -> Line<GridPlacement<Self::CustomIdent>> { ... }
    fn align_self(&self) -> Option<AlignItems> { ... }
    fn justify_self(&self) -> Option<AlignItems> { ... }
    fn grid_placement(
        &self,
        axis: AbsoluteAxis,
    ) -> Line<GridPlacement<Self::CustomIdent>> { ... }
}
Expand description

The set of styles required for a CSS Grid item (child of a CSS Grid container)

Provided Methods§

fn grid_row(&self) -> Line<GridPlacement<Self::CustomIdent>>

Defines which row in the grid the item should start and end at

fn grid_column(&self) -> Line<GridPlacement<Self::CustomIdent>>

Defines which column in the grid the item should start and end at

fn align_self(&self) -> Option<AlignItems>

How this node should be aligned in the cross/block axis Falls back to the parents AlignItems if not set

fn justify_self(&self) -> Option<AlignItems>

How this node should be aligned in the inline axis Falls back to the parents super::JustifyItems if not set

fn grid_placement( &self, axis: AbsoluteAxis, ) -> Line<GridPlacement<Self::CustomIdent>>

Get a grid item’s row or column placement depending on the axis passed

Implementations on Foreign Types§

§

impl<T> GridItemStyle for &T
where T: GridItemStyle,

Available on crate feature grid only.

Implementors§

§

impl<S> GridItemStyle for Style<S>
where S: CheapCloneStr,

Available on crate feature grid only.