Commit ee1daf09 authored by Mitko Georgiev's avatar Mitko Georgiev Committed by XhmikosR
Browse files

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.
parent dd539094
Showing with 23 additions and 13 deletions
+23 -13
...@@ -184,13 +184,18 @@ $paragraph-margin-bottom: 1rem !default; ...@@ -184,13 +184,18 @@ $paragraph-margin-bottom: 1rem !default;
// Define the minimum dimensions at which your layout will change, // Define the minimum dimensions at which your layout will change,
// adapting to different screen sizes, for use in media queries. // adapting to different screen sizes, for use in media queries.
$grid-breakpoints: ( $grid-breakpoints: () !default;
xs: 0, // stylelint-disable-next-line scss/dollar-variable-default
sm: 576px, $grid-breakpoints: map-merge(
md: 768px, (
lg: 992px, xs: 0,
xl: 1200px sm: 576px,
) !default; md: 768px,
lg: 992px,
xl: 1200px
),
$grid-breakpoints
);
@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);
...@@ -200,12 +205,17 @@ $grid-breakpoints: ( ...@@ -200,12 +205,17 @@ $grid-breakpoints: (
// //
// Define the maximum width of `.container` for different screen sizes. // Define the maximum width of `.container` for different screen sizes.
$container-max-widths: ( $container-max-widths: () !default;
sm: 540px, // stylelint-disable-next-line scss/dollar-variable-default
md: 720px, $container-max-widths: map-merge(
lg: 960px, (
xl: 1140px sm: 540px,
) !default; md: 720px,
lg: 960px,
xl: 1140px
),
$container-max-widths
);
@include _assert-ascending($container-max-widths, "$container-max-widths"); @include _assert-ascending($container-max-widths, "$container-max-widths");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment