Function layout_2020::display_list::compute_margin_box_radius
source ยท pub(crate) fn compute_margin_box_radius(
radius: BorderRadius,
layout_rect: LayoutSize,
fragment: &BoxFragment,
) -> BorderRadius
Expand description
https://drafts.csswg.org/css-shapes-1/#valdef-shape-box-margin-box
The corner radii of this shape are determined by the corresponding border-radius and margin values. If the ratio of border-radius/margin is 1 or more, or margin is negative or zero, then the margin box corner radius is max(border-radius + margin, 0). If the ratio of border-radius/margin is less than 1, and margin is positive, then the margin box corner radius is border-radius + margin * (1 + (ratio-1)^3).