.text {
  @include font-style;
  color: $color-brand--two;
  // alternative
  &--alternative {
    color: $color--two-50;
    // specific color mappings
    .bg-brand--dark-grey &,
    .bg-brand--gradient-orange &,
    .bg-brand--blue & {
      color: $color-brand--white;
    }
    @include text--alternative;
  }

  // center
  &--center {
    text-align: center;
  }

  // emphasis
  // chained to add specificity
  &--emphasis.text--emphasis {
    color: $color-brand--one;
    // specific color mappings
    .bg-brand--gradient-orange &,
    .bg-brand--blue & {
      color: $color-brand--two;
    }
  }

  // large
  &--l {
    @include font-style('body--l');
  }

  // small
  &--s {
    @include font-style('body--s');
  }

  // negative
  &--negative {
    color: $color--negative;
  }

  // positive
  &--positive {
    color: $color--positive;
  }

  // viewport l specific
  @include viewport--l {
    // dark text
    &--dark-from-l {
      color: $color-brand--two;
    }
    // light text
    &--light-from-l {
      color: $color-brand--four;
    }
  }
}

// paragraphs
p {
  @include font-style;
  margin-bottom: $spacing--m;
}


// text ellipsis
.text-ellipsis {
  @include text-ellipsis($display: block);
}


// generate classes based on type sizes list
// outputs .title--xxl, .title--xl, etc.
@each $name, $font in $type-sizes {
  // generate classes
  .#{$name} {
    @include typeset($font);
  }
  // generate placeholders
  %#{$name} {
    @include typeset($font);
  }
}
