Skip to main content

child_first_baseline

Function child_first_baseline 

Source
pub(crate) fn child_first_baseline(
    first_baseline: Option<f32>,
    height: f32,
    overflow_y: Overflow,
) -> Option<f32>
Expand description

The first baseline of a child box (measured from the top of its border box, like crate::Baselines) as used for baseline alignment and for determining its container’s baseline, given the baseline it reported, its border-box height, and its vertical overflow.

Scroll containers’ baselines are determined from their content as if scrolled to the initial position, but are additionally clamped to their border box. A scroll container with no baseline synthesizes one from its border-box bottom edge. See https://github.com/w3c/csswg-drafts/issues/7660