forked from mystiq/hydrogen-web
load images when they becomes partly into view
This commit is contained in:
parent
8642981fb8
commit
9131cf00a3
1 changed files with 7 additions and 0 deletions
|
@ -561,6 +561,13 @@ so the timeline doesn't jump when the image loads */
|
||||||
align-self: start;
|
align-self: start;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
/* stretch the image (to the spacer) on platforms
|
||||||
|
where we can trust the spacer to always have the correct height,
|
||||||
|
otherwise the image starts with height 0 and with loading=lazy
|
||||||
|
only loads when the top comes into view*/
|
||||||
|
.hydrogen:not(.legacy) .message-container .picture > img {
|
||||||
|
align-self: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
.message-container .picture > time {
|
.message-container .picture > time {
|
||||||
align-self: end;
|
align-self: end;
|
||||||
|
|
Loading…
Reference in a new issue