Enum taffy::style::GridAutoFlow
source · pub enum GridAutoFlow {
Row,
Column,
RowDense,
ColumnDense,
}
Expand description
Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.
The “dense” packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. This may cause items to appear out-of-order, when doing so would fill in holes left by larger items.
Defaults to GridAutoFlow::Row
Variants§
Row
Items are placed by filling each row in turn, adding new rows as necessary
Column
Items are placed by filling each column in turn, adding new columns as necessary.
RowDense
Combines Row
with the dense packing algorithm.
ColumnDense
Combines Column
with the dense packing algorithm.
Implementations§
source§impl GridAutoFlow
impl GridAutoFlow
sourcepub fn is_dense(&self) -> bool
pub fn is_dense(&self) -> bool
Whether grid auto placement uses the sparse placement algorithm or the dense placement algorithm See: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow#values
sourcepub fn primary_axis(&self) -> AbsoluteAxis
pub fn primary_axis(&self) -> AbsoluteAxis
Whether grid auto placement fills areas row-wise or column-wise See: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow#values
Trait Implementations§
source§impl Clone for GridAutoFlow
impl Clone for GridAutoFlow
source§fn clone(&self) -> GridAutoFlow
fn clone(&self) -> GridAutoFlow
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GridAutoFlow
impl Debug for GridAutoFlow
source§impl Default for GridAutoFlow
impl Default for GridAutoFlow
source§impl PartialEq for GridAutoFlow
impl PartialEq for GridAutoFlow
source§fn eq(&self, other: &GridAutoFlow) -> bool
fn eq(&self, other: &GridAutoFlow) -> bool
self
and other
values to be equal, and is used
by ==
.