0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-06 04:08:22 +01:00

Merge branch 'issue19217' of https://github.com/alberto/bootstrap into alberto-issue19217

This commit is contained in:
Mark Otto 2016-10-27 22:28:24 -07:00
commit ccb5248205

View File

@ -58,12 +58,12 @@
} }
} }
/// Replace `$search` with `$replace` in `$string` // Replace `$search` with `$replace` in `$string`
/// @author Hugo Giraudel // @author Hugo Giraudel
/// @param {String} $string - Initial string // @param {String} $string - Initial string
/// @param {String} $search - Substring to replace // @param {String} $search - Substring to replace
/// @param {String} $replace ('') - New value // @param {String} $replace ('') - New value
/// @return {String} - Updated string // @return {String} - Updated string
@function str-replace($string, $search, $replace: "") { @function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search); $index: str-index($string, $search);
@ -74,6 +74,15 @@
@return $string; @return $string;
} }
@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 // General variable structure
// //
// Variable format should follow the `$component-modifier-state-property` order. // Variable format should follow the `$component-modifier-state-property` order.
@ -172,6 +181,7 @@ $grid-breakpoints: (
xl: 1200px xl: 1200px
) !default; ) !default;
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); @include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@include _assert-starts-at-zero($grid-breakpoints);
// 7. Grid containers // 7. Grid containers