Trait GridContainerStyle

Source
pub trait GridContainerStyle: CoreStyle {
    type Repetition<'a>: GenericRepetition<CustomIdent = Self::CustomIdent>
       where Self: 'a;
    type TemplateTrackList<'a>: Iterator<Item = GenericGridTemplateComponent<Self::CustomIdent, Self::Repetition<'a>>> + ExactSizeIterator + Clone
       where Self: 'a;
    type AutoTrackList<'a>: Iterator<Item = TrackSizingFunction> + ExactSizeIterator + Clone
       where Self: 'a;
    type TemplateLineNames<'a>: TemplateLineNames<'a, Self::CustomIdent>
       where Self: 'a;
    type GridTemplateAreas<'a>: IntoIterator<Item = GridTemplateArea<Self::CustomIdent>>
       where Self: 'a;

Show 15 methods // Required methods fn grid_template_rows(&self) -> Option<Self::TemplateTrackList<'_>>; fn grid_template_columns(&self) -> Option<Self::TemplateTrackList<'_>>; fn grid_auto_rows(&self) -> Self::AutoTrackList<'_>; fn grid_auto_columns(&self) -> Self::AutoTrackList<'_>; fn grid_template_areas(&self) -> Option<Self::GridTemplateAreas<'_>>; fn grid_template_column_names(&self) -> Option<Self::TemplateLineNames<'_>>; fn grid_template_row_names(&self) -> Option<Self::TemplateLineNames<'_>>; // 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, ) -> Option<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§

Source

type Repetition<'a>: GenericRepetition<CustomIdent = Self::CustomIdent> where Self: 'a

The type for a repeat() within a grid_template_rows or grid_template_columns

Source

type TemplateTrackList<'a>: Iterator<Item = GenericGridTemplateComponent<Self::CustomIdent, Self::Repetition<'a>>> + ExactSizeIterator + Clone where Self: 'a

The type returned by grid_template_rows and grid_template_columns

Source

type AutoTrackList<'a>: Iterator<Item = TrackSizingFunction> + ExactSizeIterator + Clone where Self: 'a

The type returned by grid_auto_rows and grid_auto_columns

Source

type TemplateLineNames<'a>: TemplateLineNames<'a, Self::CustomIdent> where Self: 'a

The type returned by grid_template_row_names and grid_template_column_names

Source

type GridTemplateAreas<'a>: IntoIterator<Item = GridTemplateArea<Self::CustomIdent>> where Self: 'a

The type of custom identifiers used to identify named grid lines and areas

Required Methods§

Source

fn grid_template_rows(&self) -> Option<Self::TemplateTrackList<'_>>

Defines the track sizing functions (heights) of the grid rows

Source

fn grid_template_columns(&self) -> Option<Self::TemplateTrackList<'_>>

Defines the track sizing functions (widths) of the grid columns

Source

fn grid_auto_rows(&self) -> Self::AutoTrackList<'_>

Defines the size of implicitly created rows

Source

fn grid_auto_columns(&self) -> Self::AutoTrackList<'_>

Defined the size of implicitly created columns

Source

fn grid_template_areas(&self) -> Option<Self::GridTemplateAreas<'_>>

Named grid areas

Source

fn grid_template_column_names(&self) -> Option<Self::TemplateLineNames<'_>>

Defines the line names for row lines

Source

fn grid_template_row_names(&self) -> Option<Self::TemplateLineNames<'_>>

Defines the size of implicitly created rows

Provided Methods§

Source

fn grid_auto_flow(&self) -> GridAutoFlow

Controls how items get placed into the grid for auto-placed items

Source

fn gap(&self) -> Size<LengthPercentage>

How large should the gaps between items in a grid or flex container be?

Source

fn align_content(&self) -> Option<AlignContent>

How should content contained within this item be aligned in the cross/block axis

Source

fn justify_content(&self) -> Option<JustifyContent>

How should contained within this item be aligned in the main/inline axis

Source

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

How this node’s children aligned in the cross/block axis?

Source

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

How this node’s children should be aligned in the inline axis

Source

fn grid_template_tracks( &self, axis: AbsoluteAxis, ) -> Option<Self::TemplateTrackList<'_>>

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

Source

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.

Implementations on Foreign Types§

Source§

impl<T: GridContainerStyle> GridContainerStyle for &T

Implementors§