diff options
author | Martijn Cuppens <martijn.cuppens@gmail.com> | 2019-12-25 23:16:58 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-01-02 13:11:56 +0300 |
commit | 0d08c74d2fbb5e0a0b1991b5a51d7988f9e6952e (patch) | |
tree | a8237790753643209b272539e0057f4b18c67b87 /scss | |
parent | 00b0e0a9b76d3700c3b681c0e70b94b768e31a59 (diff) |
Allow percentages in container widths (#29819)
Diffstat (limited to 'scss')
-rw-r--r-- | scss/_grid.scss | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scss/_grid.scss b/scss/_grid.scss index d36ee75d88..57ec5a9d0b 100644 --- a/scss/_grid.scss +++ b/scss/_grid.scss @@ -25,11 +25,19 @@ max-width: $container-max-width; } + // Extend each breakpoint which is smaller or equal to the current breakpoint + $extend-breakpoint: true; + @each $name, $width in $grid-breakpoints { - @if ($container-max-width > $width or $breakpoint == $name) { + @if ($extend-breakpoint) { .container#{breakpoint-infix($name, $grid-breakpoints)} { @extend %responsive-container-#{$breakpoint}; } + + // Once the current breakpoint is reached, stop extending + @if ($breakpoint == $name) { + $extend-breakpoint: false; + } } } } |