/*
Truncate

Styles that allow truncating text.

truncate--one-line     - Truncated text may only be one line tall.
untruncate--one-line   - Remove one-line truncation after it's added.
truncate--many-lines   - Truncated text may be many lines tall.
untruncate--many-lines - Remove many-lines truncation after it's added.

Styleguide Tools.Mixins.Truncate
*/

/* Many Lines */
/* WARNING: Relies on proprietary and undocumented rules (that work well) */

@define-mixin truncate--many-lines {
  --lines: 2;

  overflow: hidden;

  display: -webkit-box;
  -webkit-box-orient: vertical;

  -webkit-line-clamp: var(--lines);
  max-height: calc(var(--lines) * 1lh);
}
/* DEPRECATED */
.x-truncate--many-lines,
%x-truncate--many-lines {
  @mixin truncate--many-lines;
}


@define-mixin untruncate--many-lines {
  overflow: visible;
  -webkit-line-clamp: inherit;
}
/* DEPRECATED */
.x-untruncate--many-lines,
%x-untruncate--many-lines {
  @mixin untruncate--many-lines;
}

.x-untruncate--many-lines,
%x-untruncate--many-lines {
  @mixin untruncate--many-lines;
}

/* One Line */

@define-mixin truncate--one-line {
	text-overflow: ellipsis;

	overflow: hidden;
	white-space: nowrap;
}
/* DEPRECATED */
.x-truncate--one-line,
%x-truncate--one-line {
  @mixin truncate--one-line;
}

@define-mixin untruncate--one-line {
  overflow: visible;
	white-space: normal;
}
/* DEPRECATED */
.x-untruncate--one-line,
%x-untruncate--one-line {
  @mixin untruncate--one-line;
}
