-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiline-ellipsis.scss
38 lines (30 loc) · 1.04 KB
/
multiline-ellipsis.scss
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
32
33
34
35
36
37
38
@mixin multiline-ellipsis($height, $lineheight, $ellipsiswidth) {
$ellipsiswidth: 3em !default;
.ellipsis {
overflow: hidden;
height: $height;
line-height: $lineheight; }
.ellipsis:before {
content:"";
float: left;
width: 5px; height: $height; }
.ellipsis > *:first-child {
float: right;
width: 100%;
margin-left: -5px; }
.ellipsis:after {
content: "\02026";
float: right; position: relative;
top: -25px; left: 100%;
width: $ellipsiswidth; margin-left: -$ellipsiswidth;
padding-right: 5px;
text-align: right;
background: white;
background: -webkit-gradient(linear, left top, right top,
from(rgba(255, 255, 255, 0)), to(white), color-stop(50%, white));
background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white)
}
}