// Wraps the passed rem value in a calc function that multiplies the rem with the rem multiplier.
// If the rem size if the project using Voca differs from 10px, the rem multiplier should be 10/project rem, e.g. 10/16 = 0.625.
// The return value is not the result of the calculation but the calculation itself.
// @param {length} $rem - rem based on 10px
@function dynamic-rem($rem) {
  $result: null;

  /* stylelint-disable-next-line length-zero-no-unit */
  @if $rem == 0rem or $rem == 0 {
    $result: 0;
  } @else {
    $result: calc(#{$rem} * var(--voca-rem-multiplier));
  }

  @return $result;
}
