Skip to content

Commit

Permalink
Allow percentages in container widths (twbs#29819)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens authored and olsza committed Oct 3, 2020
1 parent 6bc436e commit 7c6438a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scss/_grid.scss
Expand Up @@ -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;
}
}
}
}
Expand Down

0 comments on commit 7c6438a

Please sign in to comment.