]> 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)
committerGitHub <noreply@github.com>
Fri, 17 Apr 2020 17:18:51 +0000 (19:18 +0200)
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
scss/_functions.scss

index 49a4604660be6a98ee3f3e6f50add14729dccdfe..d93e33916f131141ec8fd6214f4e233dce0bf284 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}.";
+    }
   }
 }