UX: Make YouTube playlist onebox full width to match video onebox (#16936)

This commit is contained in:
David Taylor 2022-05-27 10:39:12 +01:00 committed by GitHub
parent 5c596273a0
commit 8fe3934856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -823,6 +823,16 @@ aside.onebox.xkcd .onebox-body img {
@extend .imgur-album;
}
@supports (aspect-ratio: 1) {
// Not supported on iOS < 15. For those devices, we just
// use the fixed width/height attributes on the iframe
.youtube-onebox {
width: 100%;
height: auto;
aspect-ratio: 16/9;
}
}
// Force oneboxed videos to 16:9 aspect ratio
.onebox.video-onebox,
.video-container {

View File

@ -57,6 +57,7 @@ module Onebox
height="#{HEIGHT}"
frameborder="0"
allowfullscreen
class="youtube-onebox"
></iframe>
HTML
elsif list_id
@ -67,6 +68,7 @@ module Onebox
height="#{HEIGHT}"
frameborder="0"
allowfullscreen
class="youtube-onebox"
></iframe>
HTML
else