Skip to main content

GridItemStyle

Trait GridItemStyle 

Source
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§

Source

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

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

Source

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

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

Source

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

Source

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

Source

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.

Implementors§

Source§

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

Available on crate feature grid only.