mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 18:50:53 +08:00
c81d4f60af
When you included an image and a full-line (github) onebox in a single message the user avatar in the inbox would be incorrectly embiggened.
30 lines
789 B
SCSS
30 lines
789 B
SCSS
$max_image_height: 150px;
|
|
|
|
.chat-message {
|
|
// append selectors to set images to a
|
|
// max height of $max_image_height
|
|
.chat-message-collapser
|
|
.onebox
|
|
img:not(.ytp-thumbnail-image, .onebox-avatar-inline),
|
|
.chat-message-collapser img.onebox,
|
|
.chat-message-collapser .chat-uploads img,
|
|
.chat-message-collapser p img,
|
|
aside.onebox .onebox-body .aspect-image-full-size,
|
|
aside.onebox .onebox-body .aspect-image-full-size img {
|
|
object-fit: contain;
|
|
max-height: $max_image_height;
|
|
max-width: 100%;
|
|
width: unset;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-message-collapser
|
|
.chat-message-collapser-header
|
|
+ div
|
|
.chat-message-collapser-youtube {
|
|
object-fit: contain;
|
|
height: $max_image_height;
|
|
width: calc(#{$max_image_height} / 9 * 16);
|
|
}
|
|
}
|