Skip to main content

resolve_block_width

Function resolve_block_width 

Source
pub fn resolve_block_width(
    style: &ComputedStyle,
    containing_block_width: f32,
) -> (f32, Edges)
Expand description

Resolve the content width of a block-level box per CSS 2.1 §10.3.3.

The constraint equation for block-level non-replaced elements in normal flow: margin-left + border-left + padding-left + width + padding-right + border-right + margin-right = containing block width