Skip to content

Commit 0d08c74

Browse files
MartijnCuppensXhmikosR
authored andcommitted
Allow percentages in container widths (#29819)
1 parent 00b0e0a commit 0d08c74

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scss/_grid.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,19 @@
2525
max-width: $container-max-width;
2626
}
2727

28+
// Extend each breakpoint which is smaller or equal to the current breakpoint
29+
$extend-breakpoint: true;
30+
2831
@each $name, $width in $grid-breakpoints {
29-
@if ($container-max-width > $width or $breakpoint == $name) {
32+
@if ($extend-breakpoint) {
3033
.container#{breakpoint-infix($name, $grid-breakpoints)} {
3134
@extend %responsive-container-#{$breakpoint};
3235
}
36+
37+
// Once the current breakpoint is reached, stop extending
38+
@if ($breakpoint == $name) {
39+
$extend-breakpoint: false;
40+
}
3341
}
3442
}
3543
}

0 commit comments

Comments
 (0)