struct OofAxis {
cb_size: f32,
inset: Line<Option<f32>>,
margin: Line<Option<f32>>,
static_position: AxisStaticPosition,
alignment: OofAlignment,
safety: AlignmentSafety,
is_inline: bool,
reversed: bool,
is_scroll_axis: bool,
}Expand description
The inputs to the absolute positioning layout model (https://www.w3.org/TR/css-position-3/#abspos-layout) in a single axis. All coordinates are physical (left-to-right / top-to-bottom) and relative to the start of the containing block’s inset-resolution area.
Fields§
§cb_size: f32The size of the containing block in this axis
inset: Line<Option<f32>>The box’s resolved inset properties (None = auto)
margin: Line<Option<f32>>The box’s resolved margins (None = auto)
static_position: AxisStaticPositionThe box’s static position (relative to the containing block’s inset-resolution area)
alignment: OofAlignmentThe box’s self-alignment in this axis
safety: AlignmentSafetyThe overflow-position modifier of the box’s self-alignment in this axis
is_inline: boolWhether this is the inline axis of the containing block
reversed: boolWhether the logical start edge of the containing block is the physical end edge of this axis (the inline axis of an RTL containing block)
is_scroll_axis: boolWhether the containing block is a scroll container which scrolls in this axis
Implementations§
Source§impl OofAxis
impl OofAxis
Sourcefn start_edge(&self) -> AxisStaticEdge
fn start_edge(&self) -> AxisStaticEdge
The physical edge corresponding to the logical start edge of the containing block
Sourcefn end_edge(&self) -> AxisStaticEdge
fn end_edge(&self) -> AxisStaticEdge
The physical edge corresponding to the logical end edge of the containing block
Sourcefn inset_modified_containing_block(&self) -> Line<f32>
fn inset_modified_containing_block(&self) -> Line<f32>
The inset-modified containing block (IMCB) in this axis https://www.w3.org/TR/css-position-3/#resolving-insets
Sourcefn inset_modified_containing_block_size(&self) -> f32
fn inset_modified_containing_block_size(&self) -> f32
The size of the IMCB in this axis: the space available to the box’s margin box
Sourcefn stretch_fit_size(&self) -> f32
fn stretch_fit_size(&self) -> f32
The stretch-fit size of the box’s border box: the IMCB minus the non-auto margins (auto margins are treated as zero) https://www.w3.org/TR/css-position-3/#abspos-auto-size
Sourcefn is_stretch_sized(&self, is_replaced: bool, is_table: bool) -> bool
fn is_stretch_sized(&self, is_replaced: bool, is_table: bool) -> bool
Whether an auto size in this axis is the stretch-fit size (rather than fit-content)
https://www.w3.org/TR/css-position-3/#abspos-auto-size
Sourcefn resolve_margins(&self, size: f32) -> Line<f32>
fn resolve_margins(&self, size: f32) -> Line<f32>
Resolve the box’s auto margins given its final size https://www.w3.org/TR/css-position-3/#abspos-margins