Type Alias taffy::style::GridPlacement

source ·
pub type GridPlacement = GenericGridPlacement<GridLine>;
Expand description

A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.

Defaults to GridPlacement::Auto

Specification

Aliased Type§

enum GridPlacement {
    Auto,
    Line(GridLine),
    Span(u16),
}

Variants§

§

Auto

Place item according to the auto-placement algorithm, and the parent’s grid_auto_flow property

§

Line(GridLine)

Place item at specified line (column or row) index

§

Span(u16)

Item should span specified number of tracks (columns or rows)

Implementations§

source§

impl GridPlacement

source

pub fn into_origin_zero_placement( self, explicit_track_count: u16, ) -> GenericGridPlacement<OriginZeroLine>

Apply a mapping function if the GridPlacement is a Track. Otherwise return self unmodified.

Trait Implementations§

source§

impl Default for GridPlacement

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl TaffyAuto for GridPlacement

source§

const AUTO: Self = Self::Auto

The auto value for type implementing TaffyAuto
source§

impl TaffyGridLine for GridPlacement

source§

fn from_line_index(index: i16) -> Self

Converts an i16 into Self
source§

impl TaffyGridSpan for GridPlacement

source§

fn from_span(span: u16) -> Self

Converts an iu6 into Self