SU-SWS/decanter

View on GitHub
core/src/scss/utilities/functions/breakpoint/_breakpoint-insert.scss

Summary

Maintainability
Test Coverage

///
/// The $su-grid-screens map defined in the grid variables file is used as the
/// $breakpoints argument by default.
///
/// Returns the breakpoint name with a dash in front. If the smallest breakpoint
/// (xs) is passed through, a blank string is returned.
///
/// @name breakpoint-insert
///
/// @param {String} $name the key in the breakpoint map. eg: sm
/// @param {Map} $breakpoints [$su-grid-screens] The breakpoint map
///
/// @example
/// breakpoint-insert(xs)
/// Returns a blank string
///
/// breakpoint-insert(sm)
/// Returns "-sm"
///
/// @group mixin
@function breakpoint-insert($name, $breakpoints: $su-grid-screens) {
  @return "-#{$name}";
}