utils.less 842 Bytes
Newer Older
1 2 3 4 5 6 7
.textOverflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  white-space: nowrap;
}

niko's avatar
niko committed
8
.textOverflowMulti(@line: 3, @bg: #fff) {
9 10 11 12 13 14 15 16
  overflow: hidden;
  position: relative;
  line-height: 1.5em;
  max-height: @line * 1.5em;
  text-align: justify;
  margin-right: -1em;
  padding-right: 1em;
  &:before {
niko's avatar
niko committed
17
    background: @bg;
18
    content: '...';
niko's avatar
niko committed
19
    padding: 0 1px;
20
    position: absolute;
niko's avatar
niko committed
21
    right: 14px;
22 23 24 25 26 27 28
    bottom: 0;
  }
  &:after {
    background: white;
    content: '';
    margin-top: 0.2em;
    position: absolute;
29
    right: 14px;
30 31 32 33 34 35 36 37 38 39 40
    width: 1em;
    height: 1em;
  }
}

// mixins for clearfix
// ------------------------
.clearfix() {
  zoom: 1;
  &:before,
  &:after {
jim's avatar
jim committed
41
    content: ' ';
42 43 44 45 46 47 48 49 50
    display: table;
  }
  &:after {
    clear: both;
    visibility: hidden;
    font-size: 0;
    height: 0;
  }
}