UNPKG

8.11 kBSCSSView Raw
1.str-chat__thread {
2 background: var(--grey-whisper);
3 flex: 1 0 300px;
4 min-width: 300px;
5 max-width: 300px;
6 font-family: var(--second-font);
7 overflow: hidden;
8 max-height: 100%;
9 display: flex;
10 flex-direction: column;
11 padding-top: 0;
12
13 .str-chat__virtual-list .str-chat__virtual-list-message-wrapper {
14 padding-left: var(--md-p);
15 padding-right: var(--md-p);
16 }
17
18 &.str-chat__thread-container {
19 max-height: 100%;
20 display: flex;
21 flex-direction: column;
22 width: 100%;
23
24 .str-chat__parent-message-li {
25 .str-chat__message {
26 padding-left: var(--md-p);
27 padding-right: var(--md-p);
28
29 .str-chat__message-inner {
30 min-width: 0;
31 }
32
33 .str-chat__message-attachment--image,
34 .str-chat__message-attachment-card {
35 border-radius: var(--border-radius) var(--border-radius) var(--border-radius) calc(var(--border-radius-sm) / 2) ;
36 }
37 }
38
39 .str-chat__message--me {
40 .str-chat__message-attachment--img,
41 .str-chat__message-attachment-card {
42 border-radius: var(--border-radius) var(--border-radius) calc(var(--border-radius-sm) / 2) var(--border-radius);
43 }
44 }
45
46 .str-chat__message--with-reactions {
47 padding-top: var(--xl-p);
48 }
49
50 .str-chat__message:not(.str-chat__message--has-attachment) {
51 padding-top: var(--xs-p);
52 }
53
54 }
55 }
56
57 &--full {
58 max-width: 100%;
59 }
60
61 &-header {
62 position: relative;
63 width: 100%;
64 background: var(--grey-whisper);
65 box-shadow: 0 1px 1px 0 var(--border);
66 height: 70px;
67 min-height: 70px;
68 top: 0;
69 display: flex;
70 align-items: center;
71 justify-content: space-between;
72 padding: 0 var(--sm-p);
73
74 &-details {
75 font-size: var(--md-font);
76 font-weight: bold;
77
78 .str-chat__thread-header-channel-name {
79 font-size: var(--sm-font);
80 font-weight: normal;
81 }
82 }
83 }
84
85 &-start {
86 border-radius: var(--border-radius-sm);
87 margin: var(--xs-m) var(--xs-m) 0 var(--xs-m);
88 padding: var(--xs-p);
89 background: var(--grey-whisper);
90 text-align: center;
91 font-size: var(--sm-font);
92 }
93
94 &-list {
95 height: 100%;
96 overflow-y: auto;
97 overflow-x: hidden;
98 display: flex;
99 flex-direction: column;
100 padding-top: var(--sm-p);
101
102 .str-chat__list {
103 padding: 0;
104 }
105
106 .str-chat__message:first-of-type .str-chat__message-inner {
107 margin-left: unset;
108 margin-right: unset;
109 }
110
111 .str-chat__message-attachment.str-chat__message-attachment {
112 &--file {
113 border-radius: var(--border-radius-md);
114 border-bottom: 1px solid var(--grey-whisper);
115 }
116
117 &--media {
118 width: 100%;
119 }
120 }
121
122 .quoted-message {
123 display: flex;
124 align-items: flex-end;
125 margin-bottom: var(--xxs-m);
126
127 &-inner {
128 display: flex;
129 text-align: start;
130 align-items: flex-end;
131 background: var(--grey-whisper);
132 border-radius: var(--border-radius-md) var(--border-radius-md) var(--border-radius-md) 0;
133 max-width: 408px;
134 padding: var(--xxs-p) var(--xs-p);
135
136 .str-chat__message-attachment.str-chat__message-attachment--file {
137 display: none;
138 }
139
140 .str-chat__message-attachment-card.str-chat__message-attachment-card--image {
141 border-radius: unset;
142 }
143
144 .str-chat__message-attachment.str-chat__message-attachment--card {
145 border: none;
146 border-radius: var(--border-radius-md);
147 }
148
149 .str-chat__message-attachment {
150 &--image:first-of-type {
151 max-height: 48px;
152 max-width: 48px;
153 }
154
155 img {
156 border-radius: var(--border-radius-md);
157 }
158 }
159
160 :nth-child(2) {
161 margin-left: var(--xs-m);
162 }
163 }
164 }
165
166 .quoted-message.mine {
167 .quoted-message-inner {
168 background: var(--white);
169 }
170 }
171 }
172}
173
174.messaging {
175 &.str-chat {
176 .str-chat {
177 &__thread {
178 margin-right: var(--xs-m);
179 margin-top: var(--sm-m);
180 border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
181 overflow: hidden;
182 background: var(--white);
183 max-height: 100%;
184 display: flex;
185 flex-direction: column;
186 padding-top: 0;
187
188 &.str-chat__thread--full {
189 position: fixed;
190 top: 0;
191 right: 0;
192 height: 100vh;
193 background: var(--white);
194 z-index: 1000;
195 margin: 0;
196 width: 100vw;
197 max-width: 100%;
198 }
199
200 .str-chat__gallery {
201 justify-content: flex-end;
202 border-radius: 0;
203
204 &-image,
205 &-placeholder {
206 width: 100px;
207 height: 100px;
208 }
209 }
210 }
211
212 &__thread-list {
213 padding: var(--sm-p) var(--sm-p) 0 var(--sm-p);
214
215 > .str-chat__list {
216 background: transparent;
217 padding: 0;
218
219 .str-chat__list--thread {
220 padding: 0;
221 }
222 }
223 }
224
225 &__thread-header {
226 z-index: 1;
227 border: none;
228 // box-shadow: none;
229 background: var(--white);
230 box-shadow: 0 2px 9px 0 var(--border), 0 1px 0 0 var(--border);
231
232 .str-chat__thread-header-details {
233 width: 100%;
234 }
235
236 .str-chat__square-button {
237 cursor: pointer;
238 padding: var(--xxs-p);
239
240 svg {
241 width: 21px;
242 height: 21px;
243 }
244 }
245 }
246
247 &__thread-start {
248 margin-top: var(--md-m);
249 }
250
251 @media screen and (max-width: 960px) {
252 &__thread {
253 position: fixed;
254 top: 0;
255 right: 0;
256 height: 100vh;
257 background: var(--white);
258 z-index: 1000;
259 margin: 0;
260 width: 100vw;
261 max-width: 100%;
262 }
263 }
264 }
265
266 &.dark {
267 .str-chat__thread {
268 background: var(--white5);
269
270 &-header {
271 background: var(--dark-grey);
272
273 box-shadow: 0 7px 9px 0 var(--black5), 0 1px 0 0 var(--black5);
274 color: var(--white);
275 }
276
277 &-start {
278 color: var(--white);
279 }
280 }
281
282 @media screen and (max-width: 960px) {
283 .str-chat__thread {
284 background: var(--dark-grey);
285 }
286 }
287 }
288 }
289
290 /** Quoted message preview in thread should not be squeezed to less than 100% for better readability */
291 .str-chat__input-flat-quoted .quoted-message-preview-content {
292 max-width: 100%;
293 }
294}
295
296.team {
297 &.str-chat {
298 .str-chat {
299 &__thread {
300 background: var(--white);
301 }
302
303 @media screen and (max-width: 960px) {
304 &__thread {
305 position: fixed;
306 top: 0;
307 right: 0;
308 height: 100vh;
309 background: var(--white);
310 z-index: 1000;
311 margin: 0;
312 width: 100vw;
313 max-width: 100%;
314 }
315 }
316
317 &__thread-header {
318 height: 80px;
319 }
320 }
321
322 &.dark {
323 .str-chat__thread {
324 background: var(--dt-bg-team);
325 }
326 }
327 }
328}
329
330.livestream.str-chat,
331.str-chat {
332 .str-chat__thread {
333 background: transparent;
334
335 &--full {
336 position: fixed;
337 top: 0;
338 right: 0;
339 height: 100vh;
340 background: var(--white);
341 z-index: 1000;
342 margin: 0;
343 width: 100vw;
344 max-width: 100%;
345 }
346
347 &-header {
348 background: var(--white30);
349 }
350 }
351
352 .str-chat__list--thread {
353 padding: 0 var(--xs-p);
354 }
355
356 &.dark {
357 .str-chat__thread {
358 background: var(--dark-grey);
359
360 &-header {
361 background: var(--white5);
362 box-shadow: 0 1px 1px 0 var(--black30);
363 color: var(--white);
364 }
365
366 &-start {
367 background: var(--black5);
368 border-radius: var(--border-radius-sm);
369 color: var(--white);
370 }
371 }
372 }
373}
374
375.dark.str-chat.messaging {
376 .str-chat__thread-list {
377 .quoted-message-inner {
378 background: var(--dark-grey);
379 }
380 }
381}