Skip to content

Commit d1828bb

Browse files
zalogMartijnCuppens
authored andcommitted
feat: checks for $grid-breakpoints map list (#30609)
Co-authored-by: Martijn Cuppens <[email protected]>
1 parent 515b34e commit d1828bb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scss/_functions.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
// Starts at zero
2424
// Used to ensure the min-width of the lowest breakpoint starts at 0.
2525
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
26-
$values: map-values($map);
27-
$first-value: nth($values, 1);
28-
@if $first-value != 0 {
29-
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
26+
@if length($map) > 0 {
27+
$values: map-values($map);
28+
$first-value: nth($values, 1);
29+
@if $first-value != 0 {
30+
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
31+
}
3032
}
3133
}
3234

0 commit comments

Comments
 (0)