_grid.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Container widths
  2. //
  3. // Set the container width, and override it for fixed navbars in media queries.
  4. @if $enable-grid-classes {
  5. // Single container class with breakpoint max-widths
  6. .container {
  7. @include make-container();
  8. @include make-container-max-widths();
  9. }
  10. // 100% wide container at all breakpoints
  11. .container-fluid {
  12. @include make-container();
  13. }
  14. // Responsive containers that are 100% wide until a breakpoint
  15. @each $breakpoint, $container-max-width in $container-max-widths {
  16. .container-#{$breakpoint} {
  17. @extend .container-fluid;
  18. }
  19. @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
  20. %responsive-container-#{$breakpoint} {
  21. max-width: $container-max-width;
  22. }
  23. @each $name, $width in $grid-breakpoints {
  24. @if ($container-max-width > $width or $breakpoint == $name) {
  25. .container#{breakpoint-infix($name, $grid-breakpoints)} {
  26. @extend %responsive-container-#{$breakpoint};
  27. }
  28. }
  29. }
  30. }
  31. }
  32. }
  33. // Row
  34. //
  35. // Rows contain your columns.
  36. @if $enable-grid-classes {
  37. .row {
  38. @include make-row();
  39. }
  40. // Remove the negative margin from default .row, then the horizontal padding
  41. // from all immediate children columns (to prevent runaway style inheritance).
  42. .no-gutters {
  43. margin-right: 0;
  44. margin-left: 0;
  45. > .col,
  46. > [class*="col-"] {
  47. padding-right: 0;
  48. padding-left: 0;
  49. }
  50. }
  51. }
  52. // Columns
  53. //
  54. // Common styles for small and large grid columns
  55. @if $enable-grid-classes {
  56. @include make-grid-columns();
  57. }