/* stylelint-disable unit-blacklist  */

@use "sass:math";

$sui-font-size-context: 16px !default;

@function rem($pixels, $context: $sui-font-size-context) {
  @if (unitless($pixels)) {
    $pixels: $pixels * 1px;
  }

  @if (unitless($context)) {
    $context: $context * 1px;
  }

  @return math.div($pixels, $context) * 1rem;
}
