Skip to content

Commit 45374f2

Browse files
authored
Easy merging of new grid breakpoints and containers
This change follows exactly what was done for the `$grays`, `$colors`, and `$theme-colors` lists in twbs#23260. This allows for easy addition of new breakpoints or grid containers also.
1 parent 7b2372f commit 45374f2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scss/_variables.scss

+8-4
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,15 @@ $paragraph-margin-bottom: 1rem !default;
182182
// Define the minimum dimensions at which your layout will change,
183183
// adapting to different screen sizes, for use in media queries.
184184

185-
$grid-breakpoints: (
185+
$grid-breakpoints: () !default;
186+
// stylelint-disable-next-line scss/dollar-variable-default
187+
$grid-breakpoints: map-merge((
186188
xs: 0,
187189
sm: 576px,
188190
md: 768px,
189191
lg: 992px,
190192
xl: 1200px
191-
) !default;
193+
), $grid-breakpoints);
192194

193195
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
194196
@include _assert-starts-at-zero($grid-breakpoints);
@@ -198,12 +200,14 @@ $grid-breakpoints: (
198200
//
199201
// Define the maximum width of `.container` for different screen sizes.
200202

201-
$container-max-widths: (
203+
$container-max-widths: () !default;
204+
// stylelint-disable-next-line scss/dollar-variable-default
205+
$container-max-widths: map-merge((
202206
sm: 540px,
203207
md: 720px,
204208
lg: 960px,
205209
xl: 1140px
206-
) !default;
210+
), $container-max-widths);
207211

208212
@include _assert-ascending($container-max-widths, "$container-max-widths");
209213

0 commit comments

Comments
 (0)