Maintain aspect ratio of YouTube embeds (#1231)

This commit is contained in:
lexi 2022-05-14 23:34:16 -05:00 committed by GitHub
parent 58206b76f2
commit 01245acdb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 21 deletions

View file

@ -155,3 +155,19 @@ h1, h2, h3, .md-header__topic {
.no-js .md-sidebar {
align-self: auto;
}
/* Maintain 16:9 aspect ratio on embedded YT videos */
.yt-embed {
position: relative;
width: 100%;
padding-bottom: 56.25%;
height: 0;
}
.yt-embed iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}