SU-SWS/decanter

View on GitHub
core/src/scss/utilities/functions/modular-scale/_get-modular-spacing-multiplier.scss

Summary

Maintainability
Test Coverage

///
/// Get a value out of the modular-spacing-multiplier map.
/// Returns the value of the $su-modular-spacing-multiplier variable at a step(integer) on the scale.
/// The default for $step is 0, which returns a multiplier value of 1.
///
/// @name get-modular-spacing-multiplier
///
/// @param {Integer} $step - Integers from -4 to 5 including 0
///
/// @group mixin
@function get-modular-spacing-multiplier($step: 0) {
  @if ($step >= -4 and $step <= 9) {
    @return map-get($su-modular-spacing-multiplier, $step);
  }
}