@use 'sass:math';
@import 'variables';

@function map-get-strict($map, $key) {
  @if map-has-key($map, $key) {
    @return map-get($map, $key);
  } @else {
    @error 'error: specified key does not exist in the mapping';
  }
}

@function map-get-lax($map, $key) {
  @if map-has-key($map, $key) {
    @return map-get($map, $key);
  } @else {
    @return $key;
  }
}

/** 取得縮放比尺寸，get-scale-size(12)*/
@function get-scale-size($value) {
  // #22245 因應 @ionic/angular 7.5 調整 1rem => 0.625rem
  @return math.div($value, $font-size-standard) * 0.625rem;
}
