]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
@warn if minimum width of smallest breakpoint != 0 19308/head
authoralberto <alberto.rodriguez@biko2.com>
Wed, 24 Feb 2016 20:42:02 +0000 (21:42 +0100)
committeralberto <alberto.rodriguez@biko2.com>
Wed, 24 Feb 2016 21:16:01 +0000 (22:16 +0100)
Fixes #19217

scss/_variables.scss

index 82ef6f96309c3eca5fae160d6f8f7a3b1cdabff5..8e9bd61284c0e380a58b40c6c9a18805d16d28de 100644 (file)
   }
 }
 
+@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