// stylelint-disable declaration-no-important

//
// Text
//

/// Alignment

.text-justify {
  text-align: justify !important;
}
.text-wrap {
  white-space: normal !important;
}
.text-nowrap {
  white-space: nowrap !important;
}
// .text-truncate { @include text-truncate(); }

// Responsive alignment

@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-up($breakpoint) {
    $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;
    }
  }
}

// Transformation

.text-lowercase {
  text-transform: lowercase !important;
}
.text-uppercase {
  text-transform: uppercase !important;
}
.text-capitalize {
  text-transform: capitalize !important;
}

// Sizes
@each $name, $size in $font-sizes {
  .font-size-h#{$name} {
    font-size: $size;
  }
}

// Types
@each $type in $text-types {
  .text-type-#{$type} {
    @include text-type($type);
  }
  .text-type-#{$type}-bold {
    @include text-type($type, 700);
  }
  .text-type-#{$type}-medium {
    @include text-type($type, $font-weight-medium);
  }
}

@each $color, $value in $text-colors {
  .text-#{$color} {
    color: $value !important;
  }
}

// Weight and italics
.font-weight-normal {
  @include font-weight($font-weight-normal, true);
}
.font-weight-medium {
  @include font-weight($font-weight-medium, true);
}
.font-weight-bold {
  @include font-weight($font-weight-bold, true);
}

.font-italic {
  font-style: italic;
}

.line-height-reset {
  line-height: 1;
}

.line-height-base {
  line-height: $line-height-base;
}
