mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-25 04:12:55 +01:00
Add map-name param to _assert-starts-at-zero (#24986)
* Add map-name param to _assert-starts-at-zero * Set default value for backwards compatibility
This commit is contained in:
parent
eb1313d213
commit
b647dd0565
@ -21,12 +21,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Starts at zero
|
// Starts at zero
|
||||||
// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
|
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
||||||
@mixin _assert-starts-at-zero($map) {
|
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
||||||
$values: map-values($map);
|
$values: map-values($map);
|
||||||
$first-value: nth($values, 1);
|
$first-value: nth($values, 1);
|
||||||
@if $first-value != 0 {
|
@if $first-value != 0 {
|
||||||
@warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
|
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ $grid-breakpoints: (
|
|||||||
) !default;
|
) !default;
|
||||||
|
|
||||||
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
|
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
|
||||||
@include _assert-starts-at-zero($grid-breakpoints);
|
@include _assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints");
|
||||||
|
|
||||||
|
|
||||||
// Grid containers
|
// Grid containers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user