Skip to content

Commit

Permalink
fix: Poster scrollbars
Browse files Browse the repository at this point in the history
Remove scrollbars on the poster when the viewport aspect ratio is wider
than the poster height.
  • Loading branch information
edwinbradford committed Oct 29, 2024
1 parent 740c10a commit 0f28a9f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/css/components/_poster.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
Expand All @@ -34,6 +33,8 @@
}

.vjs-poster img {
// The display inline property of img adds scrollbars
display: block;
width: 100%;
height: 100%;
object-fit: contain;
Expand Down

0 comments on commit 0f28a9f

Please sign in to comment.