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<AlignSelf> { ... }
fn justify_self(&self) -> Option<AlignSelf> { ... }
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§
Sourcefn grid_row(&self) -> Line<GridPlacement<Self::CustomIdent>>
fn grid_row(&self) -> Line<GridPlacement<Self::CustomIdent>>
Defines which row in the grid the item should start and end at
Sourcefn grid_column(&self) -> Line<GridPlacement<Self::CustomIdent>>
fn grid_column(&self) -> Line<GridPlacement<Self::CustomIdent>>
Defines which column in the grid the item should start and end at
Sourcefn align_self(&self) -> Option<AlignSelf>
fn align_self(&self) -> Option<AlignSelf>
How this node should be aligned in the cross/block axis
Falls back to the parents AlignItems if not set
Sourcefn justify_self(&self) -> Option<AlignSelf>
fn justify_self(&self) -> Option<AlignSelf>
How this node should be aligned in the inline axis
Falls back to the parents super::JustifyItems if not set
Sourcefn grid_placement(
&self,
axis: AbsoluteAxis,
) -> Line<GridPlacement<Self::CustomIdent>>
fn grid_placement( &self, axis: AbsoluteAxis, ) -> Line<GridPlacement<Self::CustomIdent>>
Get a grid item’s row or column placement depending on the axis passed
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: GridItemStyle> GridItemStyle for &T
Available on crate feature grid only.
impl<T: GridItemStyle> GridItemStyle for &T
Available on crate feature
grid only.fn grid_row(&self) -> Line<GridPlacement<Self::CustomIdent>>
fn grid_column(&self) -> Line<GridPlacement<Self::CustomIdent>>
fn align_self(&self) -> Option<AlignSelf>
fn justify_self(&self) -> Option<AlignSelf>
Implementors§
impl<S: CheapCloneStr> GridItemStyle for Style<S>
Available on crate feature
grid only.