Skip to content

Commit

Permalink
Make video thumbnails have certain height before image loading starts…
Browse files Browse the repository at this point in the history
… 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`
  • Loading branch information
PikachuEXE authored Mar 1, 2024
1 parent 4020139 commit c386841
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/components/ft-list-video/ft-list-video.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit c386841

Please sign in to comment.