Module style

Source
Expand description

A typed representation of CSS style properties in Rust. Used as input to layout computation.

Modules§

alignment 🔒
Style types for controlling alignment
available_space 🔒
Style type for representing available space as a sizing constraint
compact_length 🔒
A tagged-pointer abstraction that allows size styles in Taffy to be represented in just 64 bits. Wrapped by types in the super::dimension and super::grid modules.
dimension 🔒
Style types for representing lengths / sizes
grid 🔒
Style types for CSS Grid layout

Structs§

CompactLength
A representation of a length as a compact 64-bit tagged pointer
Dimension
A unit of linear measurement
GridTemplateArea
Defines a grid area
GridTemplateRepetition
A typed representation of a repeat(..) in grid-template-* value
LengthPercentage
A unit of linear measurement
LengthPercentageAuto
A unit of linear measurement
MaxTrackSizingFunction
Maximum track sizing function
MinTrackSizingFunction
Minimum track sizing function
NamedGridLine
Defines a named grid line
Style
A typed representation of the CSS style information for a single node.

Enums§

AlignContent
Sets the distribution of space between and around content items For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
AlignItems
Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
AvailableSpace
The amount of space available to a node in a given axis https://www.w3.org/TR/css-sizing-3/#available
BoxGenerationMode
An abstracted version of the CSS display property where any value other than “none” is represented by “normal” See: https://www.w3.org/TR/css-display-3/#box-generation
BoxSizing
Specifies whether size styles for this node are assigned to the node’s “content box” or “border box”
Display
Sets the layout used for the children of this node
GenericGridPlacement
A grid line placement specification which is generic over the coordinate system that it uses to define grid line positions.
GenericGridTemplateComponent
A type representing a component in a grid-template-* defintion where the type representing repeat()s is generic
GridAutoFlow
Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.
GridPlacement
A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.
GridTemplateComponent
An element in a grid-template-columns or grid-template-rows definition. Either a track sizing function or a repeat().
Overflow
How children overflowing their container should affect layout
Position
The positioning strategy for this item.
RepetitionCount
The first argument to a repeated track definition. This type represents the type of automatic repetition to perform.

Traits§

CheapCloneStr
Trait that represents a cheaply clonable string. If you’re unsure what to use here consider Arc<str> or string_cache::Atom.
CoreStyle
The core set of styles that are shared between all CSS layout nodes
GenericRepetition
A trait to represent a repeat() clause in a grid-template-* definition
GridContainerStyle
The set of styles required for a CSS Grid container
GridItemStyle
The set of styles required for a CSS Grid item (child of a CSS Grid container)
TemplateLineNames
A nested list of line names. This is effectively a generic representation of Vec<Vec<String>> that allows both the collection and string type to be customised.

Type Aliases§

AlignSelf
Controls alignment of an individual node
JustifyContent
Sets the distribution of space between and around content items For Flexbox it controls alignment in the main axis For Grid it controls alignment in the inline axis
JustifyItems
Used to control how child nodes are aligned. Does not apply to Flexbox, and will be ignored if specified on a flex container For Grid it controls alignment in the inline axis
JustifySelf
Controls alignment of an individual node
TrackSizingFunction
The sizing function for a grid track (row/column)