Skip to main content

select_breakpoint

Function select_breakpoint 

Source
pub fn select_breakpoint(
    breakpoints: &[BreakpointSpec],
    container_width_px: i32,
) -> Option<&BreakpointSpec>
Expand description

Pick the breakpoint with the largest min_width_px such that container_width_px >= min_width_px. breakpoints should be sorted by min_width_px ascending.