aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitko Georgiev <[email protected]>2018-10-23 05:48:44 +0300
committerXhmikosR <[email protected]>2018-10-23 05:48:44 +0300
commitee1daf090a07b6c45632877ea2e54fcdc63bcbc6 (patch)
treebdb1675fa1e5dee3e048b0d73ed6080482975679
parentdd539094ea6722489c5ba940523691edc556b6a3 (diff)
downloadbootstrap-ee1daf090a07b6c45632877ea2e54fcdc63bcbc6.tar.xz
bootstrap-ee1daf090a07b6c45632877ea2e54fcdc63bcbc6.zip
Easy merging of new grid breakpoints and containers (#26714)
This change follows exactly what was done for the `$grays`, `$colors`, and `$theme-colors` lists in #23260. This allows for easy addition of new breakpoints or grid containers also.
-rw-r--r--scss/_variables.scss36
1 files changed, 23 insertions, 13 deletions
diff --git a/scss/_variables.scss b/scss/_variables.scss
index 5be11ae0b..ada9af5a1 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -184,13 +184,18 @@ $paragraph-margin-bottom: 1rem !default;
// Define the minimum dimensions at which your layout will change,
// adapting to different screen sizes, for use in media queries.
-$grid-breakpoints: (
- xs: 0,
- sm: 576px,
- md: 768px,
- lg: 992px,
- xl: 1200px
-) !default;
+$grid-breakpoints: () !default;
+// stylelint-disable-next-line scss/dollar-variable-default
+$grid-breakpoints: map-merge(
+ (
+ xs: 0,
+ sm: 576px,
+ md: 768px,
+ lg: 992px,
+ xl: 1200px
+ ),
+ $grid-breakpoints
+);
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@include _assert-starts-at-zero($grid-breakpoints);
@@ -200,12 +205,17 @@ $grid-breakpoints: (
//
// Define the maximum width of `.container` for different screen sizes.
-$container-max-widths: (
- sm: 540px,
- md: 720px,
- lg: 960px,
- xl: 1140px
-) !default;
+$container-max-widths: () !default;
+// stylelint-disable-next-line scss/dollar-variable-default
+$container-max-widths: map-merge(
+ (
+ sm: 540px,
+ md: 720px,
+ lg: 960px,
+ xl: 1140px
+ ),
+ $container-max-widths
+);
@include _assert-ascending($container-max-widths, "$container-max-widths");