]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
feat: checks for `$grid-breakpoints` map list (#30609)
authorCatalin Zalog <c@zalog.ro>
Fri, 17 Apr 2020 17:18:51 +0000 (20:18 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Tue, 28 Apr 2020 17:59:30 +0000 (20:59 +0300)
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
scss/_functions.scss

index ea02aa48cadae68a846f9cbfe4591a5d341f6cd0..eb2471d75368850f773509e081807782c7c93cd5 100644 (file)
 // Starts at zero
 // Used to ensure the min-width of the lowest breakpoint starts at 0.
 @mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
-  $values: map-values($map);
-  $first-value: nth($values, 1);
-  @if $first-value != 0 {
-    @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
+  @if length($map) > 0 {
+    $values: map-values($map);
+    $first-value: nth($values, 1);
+    @if $first-value != 0 {
+      @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
+    }
   }
 }