/// Extends the width of an object given the total room it has available and the overlap factor.
///
/// @param {%}   $width the objects current width.
/// @param {%}   $room the max room it has to extend.
/// @param {%}   $factor the percent of that room to take up.
///
/// @returns {%} a number without a css unit.
///
/// @example
/// @debug overlap_factor(20%, 50%, 100%)
/// /// 50%
/// @debug overlap_factor(20%, 50%, 50%)
/// /// 35%
/// @debug overlap_factor(20%, 50%, 0%)
/// /// 20%
@use "sass:math";
@import "./strip_unit";

@function overlap_factor($width, $room, $factor) {
  @return ($room - $width) * math.div(strip_unit($factor), 100);
}
