Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Cuppens <martijn.cuppens@gmail.com>2019-12-25 23:16:58 +0300
committerGitHub <noreply@github.com>2019-12-25 23:16:58 +0300
commit538f4f10c9cd5cd3803f43dc0ccc2d8c6cdb6e7b (patch)
treeb75b3d15d7311677b2b357ff283689343c288b67 /scss/_grid.scss
parentb39f704954cda9c5d62b7142d6ba678588629e3c (diff)
Allow percentages in container widths (#29819)
Diffstat (limited to 'scss/_grid.scss')
-rw-r--r--scss/_grid.scss10
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;
+ }
}
}
}