Skip to content

Commit 3bbf121

Browse files
chore: styling cleanup (#3074)
1 parent f033a64 commit 3bbf121

40 files changed

Lines changed: 117 additions & 684 deletions

src/components/Attachment/styling/Attachment.scss

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
.str-chat {
44
/* The margin applied to every attachment in the attachment list */
5-
--str-chat__attachment-margin: var(--str-chat__spacing-0_5);
6-
7-
/* The border radius used for the borders of the component */
8-
--str-chat__attachment-list-border-radius: 0;
5+
--str-chat__attachment-margin: var(--space-2)
6+
/* The border radius used for the borders of the component */
7+
--str-chat__attachment-list-border-radius: 0;
98

109
/* The text/icon color of the component */
1110
--str-chat__attachment-list-color: var(--str-chat__text-color);
@@ -328,7 +327,7 @@
328327

329328
.str-chat__gallery .str-chat__message-attachment--svg-image,
330329
.str-chat__message-attachment--image.str-chat__message-attachment--svg-image {
331-
$padding: var(--str-chat__spacing-6);
330+
$padding: var(--space-24);
332331
padding: $padding;
333332

334333
img {
@@ -344,8 +343,8 @@
344343
display: flex;
345344
align-items: center;
346345
justify-content: center;
347-
padding: var(--str-chat__spacing-2);
348-
column-gap: var(--str-chat__spacing-4);
346+
padding: var(--space-8);
347+
column-gap: var(--space-16);
349348
//margin: var(--str-chat__attachment-margin);
350349

351350
.str-chat__file-icon {
@@ -380,7 +379,7 @@
380379
flex-direction: column;
381380
align-items: flex-start;
382381
justify-content: center;
383-
row-gap: var(--str-chat__spacing-0_5);
382+
row-gap: var(--space-2);
384383
min-width: 0;
385384
line-height: var(--typography-line-height-tight);
386385

@@ -390,7 +389,7 @@
390389
display: flex;
391390
align-items: center;
392391
justify-content: space-between;
393-
column-gap: var(--str-chat__spacing-2);
392+
column-gap: var(--space-8);
394393
font-weight: var(--typography-font-weight-semi-bold);
395394
font-size: var(--typography-font-size-sm);
396395

@@ -435,29 +434,12 @@
435434
color: var(--str-chat__voice-recording-attachment-widget-color);
436435
}
437436

438-
.str-chat__message-attachment-voice-recording-widget--first-row {
439-
@include utils.ellipsis-text-parent;
440-
441-
width: 100%;
442-
display: flex;
443-
align-items: center;
444-
justify-content: space-between;
445-
gap: var(--str-chat__spacing-1);
446-
}
447-
448437
.str-chat__message-attachment-download-icon {
449438
svg {
450439
width: calc(var(--str-chat__spacing-px) * 24);
451440
height: calc(var(--str-chat__spacing-px) * 16);
452441
}
453442
}
454-
455-
.str-chat__message-attachment__voice-recording-widget__error-message {
456-
display: flex;
457-
align-items: center;
458-
justify-content: flex-start;
459-
gap: var(--str-chat__spacing-1);
460-
}
461443
}
462444

463445
.str-chat__message-attachment__voice-recording-widget__right-section {
@@ -476,10 +458,6 @@
476458
.str-chat__message-attachment-download-icon {
477459
--str-chat-icon-height: calc(var(--str-chat__spacing-px) * 16);
478460
}
479-
480-
.str-chat__attachment-type-icon {
481-
--str-chat-icon-height: calc(var(--str-chat__spacing-px) * 37);
482-
}
483461
}
484462

485463
.str-chat__message.str-chat__message--has-single-attachment.str-chat__message--has-no-text {

src/components/Attachment/styling/CardAudio.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@use '../../../styling/utils';
2-
31
.str-chat__message-attachment-card--audio {
42
.str-chat__message-attachment-card--content {
53
padding: 0;

src/components/Attachment/styling/Geolocation.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
.str-chat__message-attachment-geolocation__status--active-until {
9595
text-transform: lowercase;
96-
font: var(--str-chat__caption-text);
96+
font: var(--str-chat__metadata-emphasis-text);
9797
}
9898
}
9999
}

src/components/Attachment/styling/Giphy.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use '../../../styling/utils';
1+
@use '../../../styling/utils' as utils;
22

33
.str-chat {
44
/* The height of GIFs */

src/components/Attachment/styling/ModalGallery.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
grid-template-rows: 50% 50%;
2424
overflow: hidden;
2525
border-radius: var(--radius-lg);
26-
gap: var(--str-chat__spacing-0_5);
26+
gap: var(--space-2);
2727
width: $max-width;
2828
max-width: $max-width;
2929
// CDN resize requires height/max-height to be present on the img element, this rule ensures that

src/components/Avatar/styling/Avatar.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
height: 100%;
2828
}
2929

30-
.str-chat__icon--person {
30+
// people icon for avatars without images and initials
31+
.str-chat__icon {
3132
width: var(--avatar-icon-size);
3233
height: var(--avatar-icon-size);
3334
stroke-width: var(--avatar-icon-stroke-width);

src/components/Channel/styling/Channel.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@
204204
/* Right (left in RTL layout) border of the component */
205205
--str-chat__channel-border-inline-end: none;
206206

207-
/* The icon color used when no channel is selected */
208-
--str-chat__channel-empty-indicator-color: var(--str-chat__disabled-color);
209-
210207
/* The base surface color behind the loading shimmer */
211208
--str-chat__channel-loading-state-color: var(--background-core-surface);
212209
}

src/components/ChannelList/styling/ChannelList.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
.str-chat__channel-list-inner {
128128
height: 100%;
129129
overflow: hidden;
130-
padding-bottom: var(--str-chat__spacing-2_5);
130+
padding-bottom: calc(var(--space-8) + var(--space-2));
131131

132132
.str-chat__channel-list-inner__main {
133133
height: 100%;
@@ -139,7 +139,7 @@
139139
flex-direction: column;
140140
align-items: center;
141141
justify-content: center;
142-
padding: var(--str-chat__spacing-3);
142+
padding: calc(var(--space-8) + var(--space-4));
143143

144144
p {
145145
color: var(--text-secondary);
@@ -152,17 +152,13 @@
152152
.str-chat__load-more-button {
153153
display: flex;
154154
justify-content: center;
155-
margin: var(--str-chat__spacing-2) 0;
155+
margin: var(--space-8) 0;
156156

157157
.str-chat__load-more-button__button {
158158
@include utils.flex-row-center;
159159
}
160160
}
161161

162-
.stream-chat__paginated-list {
163-
gap: 0;
164-
}
165-
166162
.str-chat__load-more-button__button {
167163
@include utils.component-layer-overrides('channel-list-load-more');
168164
width: 80%;

src/components/Dialog/styling/Alert.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434

3535
.str-chat__alert-header__description {
36-
font: var(--str-chat__caption-default-tex);
36+
font: var(--str-chat__caption-default-text);
3737
}
3838
}
3939
}

src/components/Dialog/styling/Prompt.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626

2727
.str-chat__prompt__header__description {
28-
font: var(--str-chat__body-text);
28+
font: var(--str-chat__caption-default-text);
2929
color: var(--text-secondary);
3030
}
3131

@@ -39,10 +39,6 @@
3939
/* Vertical padding so focus rings (e.g. TextInput wrapper box-shadow) are not clipped by scrollable-y */
4040
padding: var(--spacing-xxs) var(--spacing-xl);
4141
@include utils.scrollable-y;
42-
43-
.str-chat__prompt__title {
44-
margin-bottom: 1rem;
45-
}
4642
}
4743

4844
.str-chat__prompt__footer {

0 commit comments

Comments
 (0)