Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow percentages in container widths #29819

Merged
merged 3 commits into from Dec 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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