Skip to content

Commit

Permalink
fix: add immediate-child selector to prevent gallery targeting (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Dec 15, 2022
1 parent 18e9d09 commit 3b791bd
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/v2/styles/AttachmentList/AttachmentList-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,18 @@
}

// Images uploaded from files
.str-chat__message-attachment--image:not(.str-chat__message-attachment--card) {
img {
@include utils.clamped-height-from-original-image-dimensions(
'--str-chat__attachment-max-width',
'--str-chat__attachment-max-width'
);
.str-chat__message-attachment--image:not(.str-chat__message-attachment--card) > img {
@include utils.clamped-height-from-original-image-dimensions(
'--str-chat__attachment-max-width',
'--str-chat__attachment-max-width'
);

// CDN resize requires max-width and height/max-height to be present on this element
max-width: var(--str-chat__attachment-max-width);
max-height: var(--str-chat__attachment-max-width);
object-fit: cover;
width: 100%;
cursor: zoom-in;
}
// CDN resize requires max-width and height/max-height to be present on this element
max-width: var(--str-chat__attachment-max-width);
max-height: var(--str-chat__attachment-max-width);
object-fit: cover;
width: 100%;
cursor: zoom-in;
}

// Video files: uploaded from files and scraped
Expand Down

0 comments on commit 3b791bd

Please sign in to comment.