Make video thumbnails have certain height before image loading starts to avoid layout shifts (#4723)

* * Make video thumbnails have certain height before image loading starts to avoid layout shifts

* * Use "fallback to natural aspect ratio" feature of `aspect-ratio`
This commit is contained in:
PikachuEXE 2024-03-01 21:34:35 +08:00 committed by GitHub
parent 4020139840
commit c386841e78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -3,3 +3,8 @@
.thumbnailLink:hover {
outline: 3px solid var(--side-nav-hover-color);
}
.thumbnailImage {
// Makes img element sized correctly before image loading starts
aspect-ratio: 16/9 auto;
}