From 0f28a9fe5a0b3ba851df0832dbd9f5ee773fce68 Mon Sep 17 00:00:00 2001 From: edwinbradford Date: Tue, 29 Oct 2024 14:12:57 +0000 Subject: [PATCH] fix: Poster scrollbars Remove scrollbars on the poster when the viewport aspect ratio is wider than the poster height. --- src/css/components/_poster.scss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/css/components/_poster.scss b/src/css/components/_poster.scss index 0079b5b7d1..fb04fd6bda 100644 --- a/src/css/components/_poster.scss +++ b/src/css/components/_poster.scss @@ -1,7 +1,9 @@ .vjs-poster { display: inline-block; vertical-align: middle; - // cursor: pointer // Disabled so cursor can change for buttons + + // The cursor property is disabled so it can change over buttons + // cursor: pointer margin: 0; padding: 0; position: absolute; @@ -10,9 +12,6 @@ bottom: 0; left: 0; height: 100%; - background-repeat: no-repeat; - background-position: 50% 50%; - background-size: contain; } // Hide the poster after the video has started playing and when native controls are used @@ -34,6 +33,8 @@ } .vjs-poster img { + // The display inline property of img adds scrollbars + display: block; width: 100%; height: 100%; object-fit: contain;