summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/bourbon/app/assets/stylesheets/addons/_ellipsis.scss
blob: a367f651c1a11d2dd20e18c5dc9f892811c66ee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@charset "UTF-8";

/// Truncates text and adds an ellipsis to represent overflow.
///
/// @param {Number} $width [100%]
///   Max-width for the string to respect before being truncated
///
/// @example scss - Usage
///   .element {
///     @include ellipsis;
///   }
///
/// @example css - CSS Output
///   .element {
///     display: inline-block;
///     max-width: 100%;
///     overflow: hidden;
///     text-overflow: ellipsis;
///     white-space: nowrap;
///     word-wrap: normal;
///   }

@mixin ellipsis($width: 100%) {
  display: inline-block;
  max-width: $width;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-wrap: normal;
}