Aspect ratio improvements (fixes #1042, fixes #1366)

This commit is contained in:
Sam Potts
2019-04-12 12:19:48 +10:00
parent 9ca7b861a9
commit b247093495
8 changed files with 109 additions and 33 deletions

View File

@ -6,20 +6,21 @@
// Default to 16:9 ratio but this is set by JavaScript based on config
$embed-padding: ((100 / 16) * 9);
.plyr__video-embed {
.plyr__video-embed,
.plyr__video-wrapper--fixed-ratio {
height: 0;
padding-bottom: to-percentage($embed-padding);
position: relative;
}
iframe {
border: 0;
height: 100%;
left: 0;
position: absolute;
top: 0;
user-select: none;
width: 100%;
}
.plyr__video-embed iframe,
.plyr__video-wrapper--fixed-ratio video {
border: 0;
height: 100%;
left: 0;
position: absolute;
top: 0;
user-select: none;
width: 100%;
}
// If the full custom UI is supported