aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberto <[email protected]>2016-02-24 21:42:02 +0100
committeralberto <[email protected]>2016-02-24 22:16:01 +0100
commit79628b30fce9da3877648942edb0a1034bb5f25a (patch)
tree7267983e8e771e95dcbc0801b067b7d112941f8b
parent1c46385fe17cd80ec6a7324610a65752a28291c4 (diff)
downloadbootstrap-79628b30fce9da3877648942edb0a1034bb5f25a.tar.xz
bootstrap-79628b30fce9da3877648942edb0a1034bb5f25a.zip
@warn if minimum width of smallest breakpoint != 0
Fixes #19217
-rw-r--r--scss/_variables.scss9
1 files changed, 9 insertions, 0 deletions
diff --git a/scss/_variables.scss b/scss/_variables.scss
index 82ef6f963..8e9bd6128 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -29,6 +29,14 @@
}
}
+@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}.";
+ }
+}
+
// General variable structure
//
// Variable format should follow the `$component-modifier-state-property` order.
@@ -126,6 +134,7 @@ $grid-breakpoints: (
xl: 1200px
) !default;
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
+@include _assert-starts-at-zero($grid-breakpoints);
// Grid containers