pub fn get_position_type(styled_dom: &StyledDom, dom_id: Option<NodeId>) -> LayoutPosition {
// +spec:positioning:bda1d5 - resolves inset properties (top/right/bottom/left) as inward offsets
#[allow(clippy::field_reassign_with_default)] // struct built incrementally / test setup; a struct
// +spec:block-formatting-context:f5f992 - Out-of-flow: floated or absolutely positioned boxes laid
// +spec:positioning:5bfef3 - abspos elements use static position for auto offsets, resolve against
// flow, offset relative to containing block, establishes new CB +spec:positioning:839cbb - absolute
// elements positioned/sized solely relative to their containing block, modified by inset properties
// +spec:positioning:898590 - absolute positioning takes elements out of flow and positions them
// relative to containing block +spec:positioning:c37c1b - abspos boxes laid out in containing block
// elements from flow and positions them relative to containing block +spec:positioning:ebff77 -
#[allow(clippy::too_many_lines, clippy::cognitive_complexity)] // large but cohesive: single-purpose layout/render/parse routine (one branch per case)
// unaffected +spec:positioning:8afbe2 - Relative positioning preserves normal flow size and space;
// positioning supported for combined use +spec:positioning:b22222 - relative positioning: offset
// from static position, purely visual effect +spec:positioning:b814b6 - relative/absolute/fixed
// +spec:block-formatting-context:60ccf9 - relative positioning shifts inline boxes as a unit after
// normal flow +spec:display-property:17239f - relative positioning offsets element after normal
#[allow(clippy::too_many_lines)] // large but cohesive: single-purpose layout/render/parse routine
if position_type != LayoutPosition::Relative && position_type != LayoutPosition::Sticky {
/// +spec:position-sticky:9449f1 - for sticky positioning, insets represent offsets from scrollport
/// edge +spec:position-sticky:75412d - multiple sticky boxes in same container offset independently
/// +spec:box-model:af9af8 - sticky positioning: shift element to stay within sticky view rectangle,
#[allow(clippy::too_many_lines)] // large but cohesive: single-purpose layout/render/parse routine
// +spec:containing-block:10af51 - absolutely positioned element's CB is nearest positioned ancestor
// ancestor, or initial CB +spec:positioning:3ac06c - abspos positioned relative to containing block
// ignoring fragmentation breaks +spec:positioning:d7e4b4 - containing block of abspos element is
// +spec:containing-block:18ae8e - Absolute positioning: abs-pos box establishes new CB for normal
// flow and abs-pos (but not fixed) descendants +spec:containing-block:b6cb8b - containing block for
// abspos is nearest positioned ancestor or initial containing block +spec:positioning:09a0fa -
// Absolute positioning: CB is padding-box of nearest positioned ancestor +spec:positioning:467cb1 -
// Containing block for abs pos = nearest positioned ancestor or initial CB +spec:positioning:99d0bb
// - containing block for absolute elements is nearest positioned ancestor +spec:positioning:92e099
// - containing block for abs pos is nearest positioned ancestor or initial CB +spec:positioning:
// f57523 - containing block of abspos element is always definite (returns concrete LogicalRect)
// +spec:positioning:8f50de - relatively positioned parent serves as containing block for abspos
// initial CB +spec:positioning:383794 - Containing block for abspos is nearest positioned ancestor,
// or initial containing block if none +spec:positioning:5b3e43 - Containing block for abs-pos is
// padding box of nearest positioned ancestor, or initial CB +spec:positioning:882e67 - containing
// relative parent serves as containing block for absolute descendants +spec:positioning:00ce38 - CB
// +spec:positioning:3d88c9 - abspos available space is always definite (viewport or positioned