aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2017-06-13 22:30:33 -0700
committerMark Otto <[email protected]>2017-06-14 20:55:00 -0700
commitac96ecbec5440b67f5c6c587e4c39d06b1262e34 (patch)
treeaded0524f2604482cc1996a507671aaf92035558
parent5da5a38f0d26445003467ed0b7a046fb9c3ee82b (diff)
downloadbootstrap-ac96ecbec5440b67f5c6c587e4c39d06b1262e34.tar.xz
bootstrap-ac96ecbec5440b67f5c6c587e4c39d06b1262e34.zip
rearrange, add comments
-rw-r--r--scss/_functions.scss26
1 files changed, 18 insertions, 8 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index 870df42a7..5aa9f6620 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}.";
- }
-}