commit | author | age
|
9bcb19
|
1 |
.textOverflow() { |
I |
2 |
overflow: hidden; |
|
3 |
white-space: nowrap; |
|
4 |
text-overflow: ellipsis; |
|
5 |
word-break: break-all; |
|
6 |
} |
|
7 |
|
|
8 |
.textOverflowMulti(@line: 3, @bg: #fff) { |
|
9 |
position: relative; |
|
10 |
max-height: @line * 1.5em; |
|
11 |
margin-right: -1em; |
|
12 |
padding-right: 1em; |
|
13 |
overflow: hidden; |
|
14 |
line-height: 1.5em; |
|
15 |
text-align: justify; |
|
16 |
&::before { |
|
17 |
position: absolute; |
|
18 |
right: 14px; |
|
19 |
bottom: 0; |
|
20 |
padding: 0 1px; |
|
21 |
background: @bg; |
|
22 |
content: '...'; |
|
23 |
} |
|
24 |
&::after { |
|
25 |
position: absolute; |
|
26 |
right: 14px; |
|
27 |
width: 1em; |
|
28 |
height: 1em; |
|
29 |
margin-top: 0.2em; |
|
30 |
background: white; |
|
31 |
content: ''; |
|
32 |
} |
|
33 |
} |
|
34 |
|
|
35 |
// mixins for clearfix |
|
36 |
// ------------------------ |
|
37 |
.clearfix() { |
|
38 |
zoom: 1; |
|
39 |
&::before, |
|
40 |
&::after { |
|
41 |
display: table; |
|
42 |
content: ' '; |
|
43 |
} |
|
44 |
&::after { |
|
45 |
clear: both; |
|
46 |
height: 0; |
|
47 |
font-size: 0; |
|
48 |
visibility: hidden; |
|
49 |
} |
|
50 |
} |