Skip to content

Commit

Permalink
feat: checks for $grid-breakpoints map list (twbs#30609)
Browse files Browse the repository at this point in the history
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
  • Loading branch information
2 people authored and olsza committed Oct 3, 2020
1 parent 4cb192d commit ec979be
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scss/_functions.scss
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 ec979be

Please sign in to comment.