Skip to content

Commit

Permalink
feat: checks for $grid-breakpoints map list (#30609)
Browse files Browse the repository at this point in the history
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
  • Loading branch information
zalog and MartijnCuppens authored Apr 17, 2020
1 parent d2325b6 commit a8883a3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scss/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
// 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}.";
}
}
}

Expand Down

0 comments on commit a8883a3

Please sign in to comment.