
// stylelint-disable declaration-no-important

//
// Text
//

%text-monospace { font-family: $font-family-monospace; }


// Responsive alignment
@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-up($breakpoint) {
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
    .text#{$infix}-left,
    %text#{$infix}-left { text-align: left;}
    .text#{$infix}-right,
    %text#{$infix}-right { text-align: right; }
    %text#{$infix}-center,
    .text#{$infix}-center { text-align: center;}
  }
}


// Contextual colors
%text-white { color: $white !important; }
@each $color, $value in $theme-colors {
  @include text-emphasis-variant("%text-#{$color}", $value);
  @include text-emphasis-variant(".text-#{$color}", $value);
}
%text-body { color: $body-color !important; }
%text-muted { color: $text-muted !important; }


// Misc
%text-hide { @include text-hide($ignore-warning: true); }


// Reset
%text-reset { color: inherit !important; }


// Size
%font-size-base {
  font-size: $font-size-base;
}

%font-size-lg {
  font-size: $font-size-lg;
  letter-spacing: 0.02rem;
}

%font-size-sm {
  font-size: $font-size-sm;
  letter-spacing: 0.02rem;
}

%font-size-xs {
  font-size: $font-size-xs;
  letter-spacing: 0.02rem;
}


// Space
%white-space-normal   { white-space: normal }
%white-space-nowrap   { white-space: nowrap; }

// Weight
%font-weight-normal,
.font-weight-normal   { font-weight: $font-weight-normal; }
%font-weight-medium,
.font-weight-medium   { font-weight: $font-weight-medium }
%font-weight-bold,
.font-weight-bold     { font-weight: $font-weight-bold; }

// Alignment
%text-justify         { text-align: justify; }
%text-wrap            { white-space: normal; }
%text-nowrap          { white-space: nowrap; }

// Decorarion
%text-antialiased     { -webkit-font-smoothing: antialiased; }
%text-linethrough     { text-decoration: line-through; }
%text-decoration-none { text-decoration: none; }
%text-truncate        { @include text-truncate; }

// Transform
%text-capitalize      { text-transform: capitalize; }
%text-uppercase       { text-transform: uppercase; }
%text-lowercase       { text-transform: lowercase; }
%text-noselect        { user-select: none; }
