_grid.scss 1.62 KB
Newer Older
1
2
3
4
// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.

Mark Otto's avatar
Mark Otto committed
5
.container {
Mark Otto's avatar
Mark Otto committed
6
  @include make-container();
7
  @include make-container-max-widths();
8

Mark Otto's avatar
Mark Otto committed
9
}
10

11
12
13
14
15
16
17

// Fluid container
//
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.

.container-fluid {
Mark Otto's avatar
Mark Otto committed
18
  @include make-container();
19
20
21
22
23
24
25
}


// Row
//
// Rows contain and clear the floats of your columns.

26
27
28
29
@if $enable-grid-classes {
  .row {
    @include make-row();
  }
30
}
31

32
33
34

// Columns
//
35
// Common styles for small and large grid columns
36

37
38
39
@if $enable-grid-classes {
  @include make-grid-columns();
}
40

Mark Otto's avatar
Mark Otto committed
41
42
43
44
45

// Flex variation
//
// Custom styles for additional flex alignment options.

46
@if $enable-flex and $enable-grid-classes {
Mark Otto's avatar
Mark Otto committed
47
48
49

  // Flex column reordering

50
51
52
53
54
  @each $breakpoint in map-keys($grid-breakpoints) {
    @include media-breakpoint-up($breakpoint) {
      .col-#{$breakpoint}-first { order: -1; }
      .col-#{$breakpoint}-last  { order: 1; }
    }
55
  }
Mark Otto's avatar
Mark Otto committed
56
57
58

  // Alignment for every column in row

59
60
61
62
63
64
  @each $breakpoint in map-keys($grid-breakpoints) {
    @include media-breakpoint-up($breakpoint) {
      .row-#{$breakpoint}-top    { align-items: flex-start; }
      .row-#{$breakpoint}-center { align-items: center; }
      .row-#{$breakpoint}-bottom { align-items: flex-end; }
    }
Mark Otto's avatar
Mark Otto committed
65
66
67
68
  }

  // Alignment per column

69
70
71
72
73
74
  @each $breakpoint in map-keys($grid-breakpoints) {
    @include media-breakpoint-up($breakpoint) {
      .col-#{$breakpoint}-top    { align-self: flex-start; }
      .col-#{$breakpoint}-center { align-self: center; }
      .col-#{$breakpoint}-bottom { align-self: flex-end; }
    }
Mark Otto's avatar
Mark Otto committed
75
  }
76
}