Skip to main content

Module positioning

Module positioning 

Source
Expand description

Final positioning of layout nodes (relative, absolute, and fixed schemes)

Structs§

StickyConstraints
Sticky positioning constraints computed at layout time. At scroll time, the sticky box’s position is clamped so that it remains within the sticky view rectangle (scrollport inset by these values).

Functions§

adjust_relative_positions
Final pass to shift relatively positioned elements from their static flow position.
adjust_sticky_positions
Adjusts positions of sticky-positioned elements based on scroll offset.
find_absolute_containing_block_rect
Helper to find the containing block for an absolutely positioned element. CSS 2.1 Section 10.1: The containing block for absolutely positioned elements is the padding box of the nearest positioned ancestor.
get_position_type
Looks up the position property using the compact-cache-aware getter.
position_out_of_flow_elements
After the main layout pass, this function iterates through the tree and correctly calculates the final positions of out-of-flow elements (absolute, fixed).