1 | @notificationPrefixCls: rc-notification;
|
2 |
|
3 | .@{notificationPrefixCls} {
|
4 |
|
5 | position: fixed;
|
6 | z-index: 1000;
|
7 | display: flex;
|
8 | max-height: 100vh;
|
9 | padding: 10px;
|
10 | align-items: flex-end;
|
11 | width: 340px;
|
12 | overflow-x: hidden;
|
13 | overflow-y: auto;
|
14 | height: 100vh;
|
15 | box-sizing: border-box;
|
16 | pointer-events: none;
|
17 | flex-direction: column;
|
18 |
|
19 |
|
20 | &-top,
|
21 | &-topLeft,
|
22 | &-topRight {
|
23 | top: 0;
|
24 | }
|
25 |
|
26 | &-bottom,
|
27 | &-bottomRight,
|
28 | &-bottomLeft {
|
29 | bottom: 0;
|
30 | }
|
31 |
|
32 | &-bottomRight,
|
33 | &-topRight {
|
34 | right: 0;
|
35 | }
|
36 |
|
37 |
|
38 | &-notice {
|
39 | position: relative;
|
40 | display: block;
|
41 | box-sizing: border-box;
|
42 | line-height: 1.5;
|
43 | width: 100%;
|
44 |
|
45 | &-wrapper {
|
46 | pointer-events: auto;
|
47 | position: relative;
|
48 | display: block;
|
49 | box-sizing: border-box;
|
50 | border-radius: 3px 3px;
|
51 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
52 | margin: 0 0 16px;
|
53 | border: 1px solid #999;
|
54 | border: 0px solid rgba(0, 0, 0, 0);
|
55 | background: #fff;
|
56 | width: 300px;
|
57 | }
|
58 |
|
59 |
|
60 | &-content {
|
61 | padding: 7px 20px 7px 10px;
|
62 | }
|
63 |
|
64 | &-closable &-content {
|
65 | padding-right: 20px;
|
66 | }
|
67 |
|
68 | &-close {
|
69 | position: absolute;
|
70 | top: 3px;
|
71 | right: 5px;
|
72 | color: #000;
|
73 | font-weight: 700;
|
74 | font-size: 16px;
|
75 | line-height: 1;
|
76 | text-decoration: none;
|
77 | text-shadow: 0 1px 0 #fff;
|
78 | outline: none;
|
79 | cursor: pointer;
|
80 | opacity: 0.2;
|
81 | filter: alpha(opacity=20);
|
82 |
|
83 | &-x:after {
|
84 | content: '×';
|
85 | }
|
86 |
|
87 | &:hover {
|
88 | text-decoration: none;
|
89 | opacity: 1;
|
90 | filter: alpha(opacity=100);
|
91 | }
|
92 | }
|
93 | }
|
94 |
|
95 | &-fade {
|
96 | overflow: hidden;
|
97 | transition: all 0.3s;
|
98 | }
|
99 |
|
100 | &-fade-appear-prepare {
|
101 | pointer-events: none;
|
102 | opacity: 0 !important;
|
103 | }
|
104 |
|
105 | &-fade-appear-start {
|
106 | transform: translateX(100%);
|
107 | opacity: 0;
|
108 | }
|
109 |
|
110 | &-fade-appear-active {
|
111 | transform: translateX(0);
|
112 | opacity: 1;
|
113 | }
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 | &-stack {
|
164 | & > .@{notificationPrefixCls}-notice {
|
165 | &-wrapper {
|
166 | transition: all 0.3s;
|
167 | position: absolute;
|
168 | top: 12px;
|
169 | opacity: 1;
|
170 |
|
171 | &:not(:nth-last-child(-n + 3)) {
|
172 | opacity: 0;
|
173 | right: 34px;
|
174 | width: 252px;
|
175 | overflow: hidden;
|
176 | color: transparent;
|
177 | pointer-events: none;
|
178 | }
|
179 |
|
180 | &:nth-last-child(1) {
|
181 | right: 10px;
|
182 | }
|
183 |
|
184 | &:nth-last-child(2) {
|
185 | right: 18px;
|
186 | width: 284px;
|
187 | color: transparent;
|
188 | overflow: hidden;
|
189 | }
|
190 |
|
191 | &:nth-last-child(3) {
|
192 | right: 26px;
|
193 | width: 268px;
|
194 | color: transparent;
|
195 | overflow: hidden;
|
196 | }
|
197 | }
|
198 | }
|
199 |
|
200 | &&-expanded {
|
201 | & > .@{notificationPrefixCls}-notice {
|
202 | &-wrapper {
|
203 | &:not(:nth-last-child(-n + 1)) {
|
204 | opacity: 1;
|
205 | width: 300px;
|
206 | right: 10px;
|
207 | overflow: unset;
|
208 | color: inherit;
|
209 | pointer-events: auto;
|
210 | }
|
211 |
|
212 | &::after {
|
213 | content: "";
|
214 | position: absolute;
|
215 | left: 0;
|
216 | right: 0;
|
217 | top: -16px;
|
218 | width: 100%;
|
219 | height: calc(100% + 32px);
|
220 | background: transparent;
|
221 | pointer-events: auto;
|
222 | color: rgb(0,0,0);
|
223 | }
|
224 | }
|
225 | }
|
226 | }
|
227 |
|
228 | &.@{notificationPrefixCls}-bottomRight {
|
229 | & > .@{notificationPrefixCls}-notice-wrapper {
|
230 | top: unset;
|
231 | bottom: 12px;
|
232 | }
|
233 | }
|
234 | }
|
235 | }
|