// stylelint-disable declaration-no-important

// Alignment

.text-justify {
  text-align: justify;
}
.text-nowrap {
  white-space: nowrap;
}

// 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;
    }
    .text#{$infix}-right {
      text-align: right;
    }
    .text#{$infix}-center {
      text-align: center;
    }
  }
}

// Transformation

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

// Weight and italics

.font-weight-light {
  font-weight: $font-weight-light;
}
.font-weight-normal {
  font-weight: $font-weight-normal;
}
.font-weight-bold {
  font-weight: $font-weight-bold;
}
.font-italic {
  font-style: italic;
}

// Contextual colors

.text-white {
  color: $white;
}
.text-err {
  color: #a91e2c;
}

@each $color, $value in $theme-colors {
  @include text-emphasis-variant('.text-#{$color}', $value);
}
