Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update video embed styles #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dist/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ body > footer .nav-list.social {
width: 100%;
height: 0;
padding-top: 56.25%;
margin-top: 30px;
margin: 30px 0;
}
.video-wrapper .video-embed {
position: absolute;
Expand All @@ -1290,6 +1290,15 @@ body > footer .nav-list.social {
height: 100%;
width: 100%;
}
.native-video-wrapper {
width: 100%;
display: flex;
justify-content: center;
margin: 30px 0;
}
.native-video-wrapper .native-video-embed {
width: 100%;
}
.hero {
display: flex;
margin-bottom: 30px;
Expand Down
16 changes: 14 additions & 2 deletions src/components/video-embed.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
width: 100%;
height: 0; // no height, only padding to provide illusion of height
padding-top: 56.25%; // 16 / 9 aspect
margin-top: @base-size;
margin: @base-size 0;

.video-embed {
position: absolute;
Expand All @@ -15,4 +15,16 @@
height: 100%;
width: 100%;
}
}
}

// native video uses flex to center as won't know aspect ratio
.native-video-wrapper {
width: 100%;
display: flex;
justify-content: center;
margin: @base-size 0;

.native-video-embed {
width: 100%;
}
}