-
Notifications
You must be signed in to change notification settings - Fork 312
/
_index.less
101 lines (82 loc) · 1.81 KB
/
_index.less
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
@import "../../base.less";
@import "./_var.less";
.@{prefix}-message {
position: fixed;
top: @message-margin-x;
left: @message-margin-y;
right: @message-margin-y;
display: flex;
justify-content: @message-align;
align-items: center;
z-index: @message-z-index;
font-size: @message-text-font-size;
padding: @message-padding-top @message-padding-right @message-padding-bottom @message-padding-left;
border-radius: @message-border-radius;
color: @message-color;
background-color: #fff;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 20%);
&&-align--center {
justify-content: center;
}
&__text {
display: inline-block;
}
&__text-wrap {
flex: 1 1 auto;
display: -webkit-box; // stylelint-disable-line
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; // stylelint-disable-line
overflow: hidden;
line-height: @message-text-line-height;
}
&__text-nowrap {
word-break: keep-all;
white-space: nowrap;
}
&--close-btn {
margin-left: @message-icon-margin-left;
}
.@{prefix}-icon {
flex-shrink: 0;
font-size: @message-icon-size;
margin-right: @message-icon-margin-right;
}
.@{prefix}-icon-close {
margin-right: 0;
}
&--info {
color: @brand-color;
}
&--success {
color: @success-color;
}
&--warning {
color: @warning-color;
}
&--error {
color: @error-color;
}
}
.message-enter-active {
animation: messageEnter .3s;
}
.message-leave-active {
animation: messageOut .3s;
}
@keyframes messageEnter {
from {
transform: translate3d(0, calc(-100% - @message-margin-y), 0);
}
to {
transform: translate3d(0, 0, 0);
}
}
@keyframes messageOut {
from {
transform: translate3d(0, 0, 0);
}
to {
transform: translate3d(0, calc(-100% - @message-margin-y), 0);
}
}