discourse/plugins/chat/assets/stylesheets/common/chat-message-images.scss
Jan Cernik afe3e36363
DEV: Remove lazy-yt and replace with lazy-videos (#20722)
- Refactors the old plugin to remove jquery usage
- Adds support for Vimeo videos (default on) and Tiktok (experimental and default off)
2023-03-29 11:54:25 -04:00

45 lines
1.1 KiB
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-lazy-video {
object-fit: contain;
height: $max_image_height;
width: calc(#{$max_image_height} / 9 * 16);
}
// Prevent overflow of old lazy-yt images
// TODO: remove in December 2023
.lazyYT.lazyYT-container {
border: none;
a {
display: flex;
}
.ytp-thumbnail-image {
object-fit: contain;
height: $max_image_height;
width: calc(#{$max_image_height} / 9 * 16);
pointer-events: none;
}
}
}