@mixin text_truncate($num_lines: null, $width: 100%) {
  max-width: $width;
  overflow: hidden;

  @if $num_lines != null {
    display: -webkit-box;
    -webkit-line-clamp: $num_lines;
    -webkit-box-orient: vertical;
  }
  @else {
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
