@mixin breakword {
  word-wrap: break-word;
}

// Prevent overflow with an ellipsis
@mixin ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

// Hyphenate long words
@mixin hyphenate {
  // Careful, this breaks the word wherever it is without a hyphen
  overflow-wrap: break-word;
  word-wrap: break-word;
  
  // Adds a hyphen where the word breaks
  hyphens: auto;
}

@mixin cwui-text-classes {
  .u-break-word {
    @include breakword;
  }
  
  .u-ellipsis {
    @include ellipsis;
  }

  .u-hyphenate {
    @include hyphenate;
  }
}
