Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_flex.scss « utilities « bootstrap « stylesheets « assets - github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 502885a81e267b30450b8f48a46fd6348882ea31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Flex variation
//
// Custom styles for additional flex alignment options.

@if $enable-flex {
  @each $breakpoint in map-keys($grid-breakpoints) {
    // Flex column reordering
    @include media-breakpoint-up($breakpoint) {
      .flex-#{$breakpoint}-first { order: -1; }
      .flex-#{$breakpoint}-last { order: 1; }
      .flex-#{$breakpoint}-unordered { order: 0; }
    }

    // Alignment for every item
    @include media-breakpoint-up($breakpoint) {
      .flex-items-#{$breakpoint}-top { align-items: flex-start; }
      .flex-items-#{$breakpoint}-middle { align-items: center; }
      .flex-items-#{$breakpoint}-bottom { align-items: flex-end; }
    }

    // Alignment per item
    @include media-breakpoint-up($breakpoint) {
      .flex-#{$breakpoint}-top   { align-self: flex-start; }
      .flex-#{$breakpoint}-middle { align-self: center; }
      .flex-#{$breakpoint}-bottom { align-self: flex-end; }
    }

    // Horizontal alignment of item
    @include media-breakpoint-up($breakpoint) {
      .flex-items-#{$breakpoint}-left { justify-content: flex-start; }
      .flex-items-#{$breakpoint}-center { justify-content: center; }
      .flex-items-#{$breakpoint}-right { justify-content: flex-end; }
      .flex-items-#{$breakpoint}-around { justify-content: space-around; }
      .flex-items-#{$breakpoint}-between { justify-content: space-between; }
    }
  }
}