UNPKG

7.11 kBSCSSView Raw
1.str-chat__input {
2 background: var(--white);
3 box-shadow: 0 -1px 3px 0 var(--border), 0 -1px 0 0 var(--border);
4 display: flex;
5 flex-wrap: wrap;
6 padding: var(--xs-p);
7 position: relative;
8 font-family: var(--second-font);
9 padding-bottom: 0;
10
11 &--emojipicker {
12 position: absolute;
13 bottom: 100%;
14 right: 0;
15 }
16
17 .rfu-file-previewer {
18 flex: 1 1 100%;
19 }
20
21 &--textarea-wrapper {
22 display: flex;
23 flex-wrap: wrap;
24 flex: 1 0;
25 position: relative;
26
27 .str-chat__textarea {
28 textarea {
29 padding-right: 72px;
30 }
31 }
32 }
33
34 &-emojiselect,
35 .rfu-file-upload-button {
36 position: absolute;
37 cursor: pointer;
38 width: 22px;
39 height: 22px;
40 display: inline-flex;
41 align-items: center;
42 justify-content: center;
43 background-size: 44px 44px;
44 fill: var(--black60);
45
46 &:hover {
47 fill: var(--black);
48 }
49 }
50
51 &-emojiselect {
52 right: 20px;
53 top: calc(100% - 35px);
54 }
55
56 .rfu-file-upload-button {
57 right: 46px;
58 top: calc(100% - 34px);
59
60 &:focus-within {
61 outline: 5px auto -webkit-focus-ring-color;
62 }
63 }
64
65 &-footer {
66 display: flex;
67 justify-content: space-between;
68 font-size: var(--sm-font);
69 background: var(--white);
70 padding: 0 var(--xs-p) var(--xs-p) var(--xs-p);
71 color: var(--lighten-black);
72
73 &--typing {
74 font-style: italic;
75 }
76
77 &--count {
78 &--hidden {
79 visibility: hidden;
80 }
81 }
82 }
83}
84
85.dark .str-chat__textarea {
86 textarea::placeholder {
87 color: var(--white30);
88 }
89}
90
91.str-chat__textarea {
92 height: auto;
93 flex: 1;
94
95 textarea {
96 width: 100%;
97 outline: none;
98 padding: var(--sm-p);
99 background: var(--white);
100 border: 1px solid var(--border);
101 border-radius: var(--border-radius-md);
102 font-size: var(--lg-font);
103 min-height: 42px;
104 transition: height 100ms ease-in;
105 resize: none;
106
107 &:focus {
108 background: var(--white);
109 border: 1px solid var(--primary-color);
110 box-shadow: 0 0 0 2px var(--primary-color-faded);
111 }
112
113 &::placeholder {
114 color: var(--black50);
115 }
116 }
117}
118
119.str-chat__emojisearch {
120 bottom: calc(100%);
121 left: 0;
122 width: calc(100% - 20px);
123 position: absolute;
124 background: var(--white95);
125 box-shadow: 0 0 1px 0 var(--black30), 0 0 6px 0 var(--black10);
126 z-index: 10001;
127 border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
128 margin: 0 var(--xs-m);
129 max-height: 360px;
130 overflow-y: auto;
131
132 &__list {
133 margin: 0;
134 padding: 0;
135 list-style-type: none;
136 border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
137 }
138}
139
140.dark.str-chat {
141 .str-chat__emojisearch {
142 background: var(--dark-grey);
143 box-shadow: 0 0 1px 0 var(--black30), 0 0 6px 0 var(--black10);
144 border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
145
146 .rta__list-header {
147 background: var(--dark-grey);
148 border: 1px solid var(--white5);
149 box-shadow: 0 2px 1px 0 var(--black5);
150 color: var(--white);
151 }
152
153 .rta__entity {
154 color: var(--white);
155 }
156 }
157
158 .rfu-file-previewer__file {
159 a {
160 color: var(--white);
161 }
162
163 &:hover {
164 background: transparent;
165 }
166 }
167
168 .rfu-file-previewer__close-button {
169 color: var(--white);
170 }
171}
172
173.rta {
174 font-size: var(--md-font);
175}
176
177.rta__entity {
178 cursor: pointer;
179 width: 100%;
180 border: none;
181 background: transparent;
182}
183
184.rta__entity--selected {
185 background-color: var(--primary-color);
186 color: var(--white);
187 width: 100%;
188}
189
190// Using separate rules for Angular so React SDK integrators don't have problems with "!important"
191// Angular needs "!imporant" to override angular-mentions styles
192.active.mention-active > a /* angular-mentions autocomplete */ {
193 background-color: var(--primary-color) !important;
194 color: var(--white) !important;
195}
196
197.rta__list {
198 border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
199}
200
201.rta__list-header {
202 padding: var(--sm-p);
203 font-size: var(--md-font);
204}
205
206.str-chat__emoji-item {
207 padding: 0 var(--md-p);
208 display: flex;
209 align-items: center;
210 margin: 0 calc(var(--xs-m) * -1);
211
212 &--entity {
213 min-width: 24px;
214 }
215
216 &--highlight {
217 font-weight: var(--font-weight-bold);
218 font-size: var(--sm-font);
219 }
220
221 &--part {
222 font-size: var(--sm-font);
223 }
224}
225
226.str-chat__slash-command {
227 padding: var(--xs-p) var(--sm-p);
228 font-size: var(--md-font);
229 display: flex;
230 flex-direction: column;
231 align-items: flex-start;
232
233 br {
234 display: none;
235 }
236
237 &-description {
238 font-size: var(--sm-font);
239 }
240}
241
242.str-chat__user-item {
243 padding: var(--xs-p) var(--sm-p);
244 display: flex;
245 align-items: center;
246
247 &--highlight {
248 font-weight: var(--font-weight-bold);
249 font-size: var(--sm-font);
250 }
251
252 &--part {
253 font-size: var(--sm-font);
254 }
255}
256
257.str-chat {
258 .rfu-dropzone .rfu-dropzone__notifier {
259 position: absolute;
260 height: 100%;
261 width: 100%;
262 padding: var(--xxs-p);
263 z-index: 1001;
264 display: none;
265 }
266
267 .rfu-dropzone--accept .rfu-dropzone__notifier {
268 background: var(--primary-color-faded);
269 display: block;
270 }
271
272 .rfu-dropzone--reject .rfu-dropzone__notifier {
273 background: var(--red);
274 display: block;
275 }
276}
277
278.rfu-dropzone__inner {
279 width: 100%;
280 height: 100%;
281 padding: 0 var(--lg-p);
282 border: 1px dashed transparent;
283 box-sizing: border-box;
284 display: flex;
285 text-align: center;
286 align-items: center;
287 justify-content: center;
288 flex-direction: column;
289 color: var(--white);
290 font-weight: 800;
291 font-size: var(--sm-font);
292
293 svg {
294 display: none;
295 }
296}
297
298.rfu-dropzone--reject .rfu-dropzone__inner {
299 display: none;
300}
301
302.str-chat__file-uploads {
303 max-height: 300px;
304 flex: 1 1 100%;
305 overflow-y: auto;
306}
307
308.rfu-file-upload-button svg {
309 fill: var(--grey);
310}
311
312.dark.str-chat {
313 .str-chat__input {
314 background: var(--white5);
315 box-shadow: 0 -1px 1px 0 var(--black30);
316
317 &-footer {
318 background: var(--white5);
319 }
320
321 textarea {
322 background: var(--black10);
323 border: 1px solid var(--black40);
324 border-radius: var(--border-radius-sm);
325 color: var(--white);
326 }
327
328 .str-chat__input-emojiselect {
329 svg {
330 fill: var(--white);
331 }
332 }
333
334 .rfu-file-upload-button {
335 svg {
336 fill: var(--white);
337 }
338 }
339 }
340}
341
342.str-chat__fileupload-wrapper {
343 .str-chat__tooltip {
344 display: none;
345 bottom: 35px;
346 right: 50px;
347 }
348
349 &:hover {
350 .str-chat__tooltip {
351 display: block;
352 }
353 }
354}
355
356.str-chat__emojiselect-wrapper {
357 .str-chat__tooltip {
358 display: none;
359 bottom: 35px;
360 right: 24px;
361 }
362
363 &:hover {
364 .str-chat__tooltip {
365 display: block;
366 }
367 }
368}
369
370.str-chat__small-message-input--textarea-wrapper {
371 .str-chat__fileupload-wrapper {
372 .str-chat__tooltip {
373 bottom: 32px;
374 right: 32px;
375 }
376 }
377
378 .str-chat__emojiselect-wrapper {
379 .str-chat__tooltip {
380 bottom: 32px;
381 right: 10px;
382 }
383 }
384
385 .str-chat__input-small-cooldown {
386 position: absolute;
387 right: 20px;
388 font-size: var(--lg-font);
389 font-weight: var(--font-weight-bold);
390 top: 6px;
391 }
392}