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-07-27 19:57:30 +08:00
|
|
|
.onebox img:not(.ytp-thumbnail-image, .onebox-avatar-inline),
|
|
|
|
img.onebox,
|
|
|
|
.chat-uploads img,
|
|
|
|
p img,
|
2022-11-02 21:41:30 +08:00
|
|
|
aside.onebox .onebox-body .aspect-image-full-size,
|
2023-06-23 16:33:12 +08:00
|
|
|
aside.onebox .onebox-body .aspect-image-full-size img,
|
|
|
|
.chat-message-text p img:not(.emoji) {
|
2022-11-02 21:41:30 +08:00
|
|
|
object-fit: contain;
|
|
|
|
max-height: $max_image_height;
|
|
|
|
max-width: 100%;
|
|
|
|
width: unset;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2023-07-27 19:57:30 +08:00
|
|
|
.onebox {
|
|
|
|
container-type: inline-size;
|
|
|
|
|
|
|
|
.thumbnail {
|
|
|
|
&.onebox-avatar {
|
|
|
|
max-height: 100px;
|
|
|
|
width: 20%;
|
|
|
|
max-width: 60px;
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@container (width < 400px) {
|
|
|
|
.onebox-body {
|
|
|
|
&:not(:has(.thumbnail.onebox-avatar)) {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
|
|
|
h3 {
|
|
|
|
margin-block: 0.75rem 0;
|
|
|
|
}
|
|
|
|
p {
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.thumbnail {
|
|
|
|
max-width: 100% !important;
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
&.onebox-avatar {
|
|
|
|
max-width: 20%;
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-02 21:41:30 +08:00
|
|
|
.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
|
|
|
}
|