Skip to content

Commit

Permalink
Easy merging of new grid breakpoints and containers (#26714)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
omnichronous authored and XhmikosR committed Oct 23, 2018
1 parent dd53909 commit ee1daf0
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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");

Expand Down

0 comments on commit ee1daf0

Please sign in to comment.