Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorCatalin Zalog <c@zalog.ro>2020-04-17 20:18:51 +0300
committerGitHub <noreply@github.com>2020-04-17 20:18:51 +0300
commita8883a3b96a94d9c096d1047564eeb87de7e79e7 (patch)
treeafdfc7b0f01713073d7b0e5f2dfabaca525fb650 /scss
parentd2325b65c88a27568accf606442c9d1d2204c05b (diff)
feat: checks for `$grid-breakpoints` map list (#30609)
Co-authored-by: Martijn Cuppens <martijn.cuppens@gmail.com>
Diffstat (limited to 'scss')
-rw-r--r--scss/_functions.scss10
1 files changed, 6 insertions, 4 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index 49a4604660..d93e33916f 100644
--- a/scss/_functions.scss
+++ b/scss/_functions.scss
@@ -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}.";
+ }
}
}