Skip to main content

Module box_model

Module box_model 

Source
Expand description

CSS 2.1 Section 8.3.1 Box Model and Vertical Margin Collapsing Engine.

Functions§

clamp_dimension
Clamps a computed size against min and max constraints.
clamp_dimension_with_node
Clamps a computed size against min and max constraints with node context.
clear_inline_descendant_line_boxes
Recursively clears line boxes from inline phrasing descendants whose text is absorbed by parent IFC using an iterative heap stack.
collapse_margins
Collapses two adjacent vertical margins according to CSS 2.1 §8.3.1.
inline_style_from_computed_style
Converts a ComputedStyle into an InlineTextStyle for inline text shaping and typography.
is_empty_collapsible_block
Returns true if an in-flow block element has zero computed height, no padding or border, and no in-flow content, allowing its top and bottom margins to collapse through under CSS 2.1 §8.3.1.
is_inline_phrasing_node
Returns whether a child layout node is an inline phrasing element.
node_establishes_bfc
Returns true if an element establishes an independent formatting context (BFC, FFC, GFC), preventing margin collapsing across its boundaries under W3C CSS 2.1 §8.3.1 and CSS Display Level 3.
refresh_inline_fragment_styles
Refreshes inline fragment paint styles after a style-only change.
resolve_dimension
Resolves a CSS Dimension into concrete pixels relative to an available length.
resolve_dimension_with_node
Resolves a CSS Dimension into concrete pixels relative to an available length and node context, evaluating intrinsic keywords (min-content, max-content, fit-content) via compute_min_max_sizes.
solve_block
Executes normal-flow block layout with vertical margin collapsing.
solve_block_children
Positions in-flow block children vertically with CSS 2.1 §8.3.1 margin collapsing, IFC, and floats.
solve_block_children_with_exclusions
Positions in-flow block children with active exclusion space tracking and float dispatch.
solve_block_children_with_exclusions_guarded
solve_block_with_exclusions
Executes normal-flow block layout passing parent exclusion space for float obstructions.
solve_block_with_exclusions_guarded
Executes normal-flow block layout with an active depth guard to prevent stack overflow.
translate_node_and_descendants
Recursively translates layout geometry and line box fragments of a node and its descendants.