diff --git a/scss/_functions.scss b/scss/_functions.scss index 870df42a79..5aa9f66209 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -1,3 +1,9 @@ +// Bootstrap functions +// +// Utility mixins and functions for evalutating source code across our variables, maps, and mixins. + +// Ascending +// Used to evaluate Sass maps like our grid breakpoints. @mixin _assert-ascending($map, $map-name) { $prev-key: null; $prev-num: null; @@ -14,7 +20,19 @@ } } +// Starts at zero +// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0. +@mixin _assert-starts-at-zero($map) { + $values: map-values($map); + $first-value: nth($values, 1); + @if $first-value != 0 { + @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; + } +} + // Replace `$search` with `$replace` in `$string` +// Used on our SVG icon backgrounds for custom forms. +// // @author Hugo Giraudel // @param {String} $string - Initial string // @param {String} $search - Substring to replace @@ -29,11 +47,3 @@ @return $string; } - -@mixin _assert-starts-at-zero($map) { - $values: map-values($map); - $first-value: nth($values, 1); - @if $first-value != 0 { - @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; - } -}