Skip to content

Commit

Permalink
@warn if minimum width of smallest breakpoint != 0
Browse files Browse the repository at this point in the history
Fixes #19217
  • Loading branch information
alberto committed Feb 24, 2016
1 parent 1c46385 commit 79628b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
}
}

@mixin _assert-starts-at-zero($map) {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
@warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
}
}

// General variable structure
//
// Variable format should follow the `$component-modifier-state-property` order.
Expand Down Expand Up @@ -126,6 +134,7 @@ $grid-breakpoints: (
xl: 1200px
) !default;
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@include _assert-starts-at-zero($grid-breakpoints);


// Grid containers
Expand Down

0 comments on commit 79628b3

Please sign in to comment.