@use 'sass:math';
@use 'sass:map';
@use 'variables' as *;

@function rem($pixel) {
  @return math.div(remove-unit($pixel), $font-size-base) + rem;
}

@function vw($pixel, $point: mobile) {
  $vw-value: math.div(remove-unit($pixel), map.get($canvas-width, $point)) * 100;
  @return math.div(round($vw-value * 10000), 10000) + vw;
}

@function remove-unit($value) {
  @return math.div($value, $value * 0 + 1);
}
