_text.scss 1.74 KB
Newer Older
XhmikosR's avatar
XhmikosR committed
1
2
// stylelint-disable declaration-no-important

3
4
5
6
//
// Text
//

Mark Otto's avatar
Mark Otto committed
7
8
.text-monospace { font-family: $font-family-monospace; }

9
10
// Alignment

11
12
13
.text-justify  { text-align: justify !important; }
.text-nowrap   { white-space: nowrap !important; }
.text-truncate { @include text-truncate; }
14
15
16
17
18

// Responsive alignment

@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-up($breakpoint) {
19
20
21
22
23
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);

    .text#{$infix}-left   { text-align: left !important; }
    .text#{$infix}-right  { text-align: right !important; }
    .text#{$infix}-center { text-align: center !important; }
24
25
26
27
28
  }
}

// Transformation

29
30
31
.text-lowercase  { text-transform: lowercase !important; }
.text-uppercase  { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
32
33
34

// Weight and italics

35
36
37
38
39
40
.font-weight-light   { font-weight: $font-weight-light !important; }
.font-weight-lighter { font-weight: $font-weight-lighter !important; }
.font-weight-normal  { font-weight: $font-weight-normal !important; }
.font-weight-bold    { font-weight: $font-weight-bold !important; }
.font-weight-bolder  { font-weight: $font-weight-bolder !important; }
.font-italic         { font-style: italic !important; }
41
42
43

// Contextual colors

44
.text-white { color: $white !important; }
45

46
@each $color, $value in $theme-colors {
XhmikosR's avatar
XhmikosR committed
47
  @include text-emphasis-variant(".text-#{$color}", $value);
48
}
49

Mark Otto's avatar
Mark Otto committed
50
.text-body { color: $body-color !important; }
Mark Otto's avatar
Mark Otto committed
51
.text-muted { color: $text-muted !important; }
Mark Otto's avatar
Mark Otto committed
52

53
54
55
.text-black-50 { color: rgba($black, .5) !important; }
.text-white-50 { color: rgba($white, .5) !important; }

56
57
58
// Misc

.text-hide {
59
  @include text-hide($ignore-warning: true);
60
}
61
62

.text-decoration-none { text-decoration: none !important; }