From: Martijn Cuppens Date: Wed, 25 Dec 2019 20:16:58 +0000 (+0100) Subject: Allow percentages in container widths (#29819) X-Git-Tag: v5.0.0-alpha1~566 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=538f4f10c9cd5cd3803f43dc0ccc2d8c6cdb6e7b;p=thirdparty%2Fbootstrap.git Allow percentages in container widths (#29819) --- 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; + } } } }