2022-11-02 21:41:30 +08:00
|
|
|
$max_image_height: 150px;
|
|
|
|
|
|
|
|
.chat-message {
|
|
|
|
// append selectors to set images to a
|
|
|
|
// max height of $max_image_height
|
2023-02-28 06:03:02 +08:00
|
|
|
.chat-message-collapser
|
|
|
|
.onebox
|
|
|
|
img:not(.ytp-thumbnail-image, .onebox-avatar-inline),
|
2022-11-02 21:41:30 +08:00
|
|
|
.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
|
2023-03-29 23:54:25 +08:00
|
|
|
.chat-message-collapser-lazy-video {
|
2022-11-02 21:41:30 +08:00
|
|
|
object-fit: contain;
|
2023-04-08 21:43:17 +08:00
|
|
|
max-height: $max_image_height;
|
|
|
|
max-width: calc(#{$max_image_height} / 9 * 16);
|
2022-11-02 21:41:30 +08:00
|
|
|
}
|
2023-03-29 23:54:25 +08:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
}
|
2022-11-02 21:41:30 +08:00
|
|
|
}
|