Module style_helpers

Source
Expand description

Helper functions which it make it easier to create instances of types in the style and geometry modules.

Traits§

FromFr
Trait to create constant percent values from plain numbers
FromLength
Trait to create absolute length values from plain numbers
FromPercent
Trait to create constant percent values from plain numbers
TaffyAuto
Trait to abstract over auto values
TaffyFitContent
Trait to create fit-content(…) values from plain numbers
TaffyGridLine
Trait to abstract over grid line values
TaffyGridSpan
Trait to abstract over grid span values
TaffyMaxContent
Trait to abstract over max_content values
TaffyMinContent
Trait to abstract over min_content values
TaffyZero
Trait to abstract over zero values

Functions§

auto
Returns the auto value for that type
evenly_sized_tracks
Returns a grid template containing count evenly sized tracks
fit_content
Returns a value of the inferred type which represent a fit-content(…) value with the given argument.
flex
Shorthand for minmax(0, Nfr). Probably what you want if you want exactly evenly sized tracks.
fr
Create a Fraction track sizing function (fr in CSS)
length
Returns a value of the inferred type which represent an absolute length
line
Specifies a grid line to place a grid item between in CSS Grid Line coordinates:
max_content
Returns the auto value for that type
min_content
Returns the auto value for that type
minmax
Returns a MinMax with min value of min and max value of max
percent
Returns a value of the inferred type which represent a percentage
repeat
Returns an auto-repeated track definition
span
Returns a GridPlacement::Span
zero
Returns the zero value for that type