SU-SWS/decanter

View on GitHub
core/src/scss/utilities/functions/type-checks/_is-absolute-length.scss

Summary

Maintainability
Test Coverage

///
/// Validates wether something is an absolute unit.
///
/// @name is-absolute-length
///
/// @param {Integer} $value - the value to type check
///
/// @group mixin
@function is-absolute-length($value) {
  @return is-number($value) and index('cm' 'mm' 'in' 'px' 'pt' 'pc', unit($value)) != null;
}