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

fix: 🍰 Fix Embed iframe Width And Height CSS #4897

Merged
merged 1 commit into from
Jan 31, 2022
Merged
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
16 changes: 15 additions & 1 deletion webapp/components/Embed/EmbedComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,24 @@ export default {
}

.html {
width: 100%;
// width: 100%;
// height: 100%;

// see this working solution here: https://stackoverflow.com/questions/35814653/automatic-height-when-embedding-a-youtube-video
position: relative;
padding-bottom: 56.25%; /* 16:9 */
height: 0;

iframe {
// width: 100%;
// height: auto;

// same solution example as above
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}

Expand Down