Trait taffy::style::grid::GridContainerStyle
source · pub trait GridContainerStyle: CoreStyle {
type TemplateTrackList<'a>: Borrow<[TrackSizingFunction]>
where Self: 'a;
type AutoTrackList<'a>: Borrow<[NonRepeatedTrackSizingFunction]>
where Self: 'a;
// Required methods
fn grid_template_rows(&self) -> Self::TemplateTrackList<'_>;
fn grid_template_columns(&self) -> Self::TemplateTrackList<'_>;
fn grid_auto_rows(&self) -> Self::AutoTrackList<'_>;
fn grid_auto_columns(&self) -> Self::AutoTrackList<'_>;
// Provided methods
fn grid_auto_flow(&self) -> GridAutoFlow { ... }
fn gap(&self) -> Size<LengthPercentage> { ... }
fn align_content(&self) -> Option<AlignContent> { ... }
fn justify_content(&self) -> Option<JustifyContent> { ... }
fn align_items(&self) -> Option<AlignItems> { ... }
fn justify_items(&self) -> Option<AlignItems> { ... }
fn grid_template_tracks(
&self,
axis: AbsoluteAxis,
) -> Self::TemplateTrackList<'_> { ... }
fn grid_align_content(&self, axis: AbstractAxis) -> AlignContent { ... }
}
Expand description
The set of styles required for a CSS Grid container
Required Associated Types§
sourcetype TemplateTrackList<'a>: Borrow<[TrackSizingFunction]>
where
Self: 'a
type TemplateTrackList<'a>: Borrow<[TrackSizingFunction]> where Self: 'a
The type returned by grid_template_rows and grid_template_columns
sourcetype AutoTrackList<'a>: Borrow<[NonRepeatedTrackSizingFunction]>
where
Self: 'a
type AutoTrackList<'a>: Borrow<[NonRepeatedTrackSizingFunction]> where Self: 'a
The type returned by grid_auto_rows and grid_auto_columns
Required Methods§
sourcefn grid_template_rows(&self) -> Self::TemplateTrackList<'_>
fn grid_template_rows(&self) -> Self::TemplateTrackList<'_>
Defines the track sizing functions (heights) of the grid rows
sourcefn grid_template_columns(&self) -> Self::TemplateTrackList<'_>
fn grid_template_columns(&self) -> Self::TemplateTrackList<'_>
Defines the track sizing functions (widths) of the grid columns
sourcefn grid_auto_rows(&self) -> Self::AutoTrackList<'_>
fn grid_auto_rows(&self) -> Self::AutoTrackList<'_>
Defines the size of implicitly created rows
sourcefn grid_auto_columns(&self) -> Self::AutoTrackList<'_>
fn grid_auto_columns(&self) -> Self::AutoTrackList<'_>
Defined the size of implicitly created columns
Provided Methods§
sourcefn grid_auto_flow(&self) -> GridAutoFlow
fn grid_auto_flow(&self) -> GridAutoFlow
Controls how items get placed into the grid for auto-placed items
sourcefn gap(&self) -> Size<LengthPercentage>
fn gap(&self) -> Size<LengthPercentage>
How large should the gaps between items in a grid or flex container be?
sourcefn align_content(&self) -> Option<AlignContent>
fn align_content(&self) -> Option<AlignContent>
How should content contained within this item be aligned in the cross/block axis
sourcefn justify_content(&self) -> Option<JustifyContent>
fn justify_content(&self) -> Option<JustifyContent>
How should contained within this item be aligned in the main/inline axis
sourcefn align_items(&self) -> Option<AlignItems>
fn align_items(&self) -> Option<AlignItems>
How this node’s children aligned in the cross/block axis?
sourcefn justify_items(&self) -> Option<AlignItems>
fn justify_items(&self) -> Option<AlignItems>
How this node’s children should be aligned in the inline axis
sourcefn grid_template_tracks(
&self,
axis: AbsoluteAxis,
) -> Self::TemplateTrackList<'_>
fn grid_template_tracks( &self, axis: AbsoluteAxis, ) -> Self::TemplateTrackList<'_>
Get a grid item’s row or column placement depending on the axis passed
sourcefn grid_align_content(&self, axis: AbstractAxis) -> AlignContent
fn grid_align_content(&self, axis: AbstractAxis) -> AlignContent
Get a grid container’s align-content or justify-content alignment depending on the axis passed