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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.