summaryrefslogtreecommitdiffstats
path: root/assets/sass/@primer/css/truncate/truncate.scss
blob: 8590f1b408d2d56778d6b7cfa9be44a30be87034 (plain) (blame)
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
31
// Truncate
//
// css-truncate will shorten text with an ellipsis.

.css-truncate {

  // css-truncate-auto will shorten text with an ellipsis when overflowing
  &.css-truncate-overflow,
  .css-truncate-overflow,
  &.css-truncate-target,
  .css-truncate-target {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  // css-truncate-target will shorten text with an ellipsis and a max width
  &.css-truncate-target,
  .css-truncate-target {
    display: inline-block;
    max-width: 125px;
    vertical-align: top;
  }

  &.expandable.zeroclipboard-is-hover .css-truncate-target,
  &.expandable.zeroclipboard-is-hover.css-truncate-target,
  &.expandable:hover .css-truncate-target,
  &.expandable:hover.css-truncate-target {
    max-width: 10000px !important;
  }
}