You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

9 months ago
  1. // Container widths
  2. //
  3. // Set the container width, and override it for fixed navbars in media queries.
  4. @if $enable-container-classes {
  5. // Single container class with breakpoint max-widths
  6. .container,
  7. // 100% wide container at all breakpoints
  8. .container-fluid {
  9. @include make-container();
  10. }
  11. // Responsive containers that are 100% wide until a breakpoint
  12. @each $breakpoint, $container-max-width in $container-max-widths {
  13. .container-#{$breakpoint} {
  14. @extend .container-fluid;
  15. }
  16. @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
  17. %responsive-container-#{$breakpoint} {
  18. max-width: $container-max-width;
  19. }
  20. // Extend each breakpoint which is smaller or equal to the current breakpoint
  21. $extend-breakpoint: true;
  22. @each $name, $width in $grid-breakpoints {
  23. @if ($extend-breakpoint) {
  24. .container#{breakpoint-infix($name, $grid-breakpoints)} {
  25. @extend %responsive-container-#{$breakpoint};
  26. }
  27. // Once the current breakpoint is reached, stop extending
  28. @if ($breakpoint == $name) {
  29. $extend-breakpoint: false;
  30. }
  31. }
  32. }
  33. }
  34. }
  35. }