Skip to content

Commit 4f08dad

Browse files
committed
fix(ModalGallery): add missing border radii and correct gap btw images
1 parent 98ceb7b commit 4f08dad

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

src/components/Attachment/styling/ModalGallery.scss

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$max-width: var(--str-chat__attachment-max-width);
66

77
.str-chat__modal-gallery {
8-
background: transparent;
8+
background-color: var(--chat-bg);
99
color: var(--str-chat__text-primary);
1010
border-radius: calc(
1111
var(--str-chat__message-bubble-radius-group-bottom) - var(
@@ -17,36 +17,64 @@
1717
grid-template-rows: 50% 50%;
1818
overflow: hidden;
1919
border-radius: var(--str-chat__radius-lg);
20-
gap: var(--str-chat__space-2);
20+
gap: var(--str-chat__spacing-xxs);
2121
width: $max-width;
2222
max-width: 100%;
2323
aspect-ratio: 4 / 3;
2424

25+
$outer-radius: var(--str-chat__radius-lg);
26+
$inner-radius: var(--str-chat__radius-md);
27+
2528
.str-chat__modal-gallery__image {
2629
width: 100%;
2730
height: 100%;
2831
min-width: 0;
2932
min-height: 0;
33+
border-radius: $inner-radius;
34+
35+
&:nth-child(1) {
36+
border-start-start-radius: $outer-radius;
37+
}
38+
&:nth-child(2) {
39+
border-start-end-radius: $outer-radius;
40+
}
41+
&:nth-child(3) {
42+
border-end-start-radius: $outer-radius;
43+
}
44+
&:nth-child(4) {
45+
border-end-end-radius: $outer-radius;
46+
}
3047
}
3148

3249
&.str-chat__modal-gallery--two-images {
3350
grid-template-rows: 1fr;
51+
52+
.str-chat__modal-gallery__image:nth-child(1) {
53+
border-end-start-radius: $outer-radius;
54+
}
55+
56+
.str-chat__modal-gallery__image:nth-child(2) {
57+
border-end-end-radius: $outer-radius;
58+
}
3459
}
3560

3661
&.str-chat__modal-gallery--three-images {
3762
.str-chat__modal-gallery__image:nth-child(1) {
3863
grid-column: 1;
39-
grid-row: 1 / span 2; /* Span two rows */
64+
grid-row: 1 / span 2;
65+
border-end-start-radius: $outer-radius;
4066
}
4167

4268
.str-chat__modal-gallery__image:nth-child(2) {
4369
grid-column: 2;
4470
grid-row: 1;
71+
border-start-end-radius: $outer-radius;
4572
}
4673

4774
.str-chat__modal-gallery__image:nth-child(3) {
4875
grid-column: 2;
4976
grid-row: 2;
77+
border-end-end-radius: $outer-radius;
5078
}
5179
}
5280

0 commit comments

Comments
 (0)