mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-25 15:29:27 -05:00
CSS: Fix thumbnails' aspect ratio to prevent CLS (#4278)
Force the thumbnails aspect ratio to 16/9 in order to prevent Cumulative Layout Shifting (CLS) from hapenning during lazy loading. It also fixes the problematic, taller thumbnails that Youtube returns for playlists. Closes issue 4002
This commit is contained in:
commit
338d3d9f86
@ -197,6 +197,7 @@ img.thumbnail {
|
|||||||
display: block; /* See: https://stackoverflow.com/a/11635197 */
|
display: block; /* See: https://stackoverflow.com/a/11635197 */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
aspect-ratio: 16 / 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail-placeholder {
|
.thumbnail-placeholder {
|
||||||
|
Loading…
Reference in New Issue
Block a user