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

make it responsive #2

Closed
Garbee opened this issue Nov 13, 2019 · 2 comments · Fixed by #12
Closed

make it responsive #2

Garbee opened this issue Nov 13, 2019 · 2 comments · Fixed by #12

Comments

@Garbee
Copy link
Contributor

Garbee commented Nov 13, 2019

Looking at the element it creates an embed with a hard-coded size. By allowing custom attributes to be used to give a size (and handle their changing events) we can allow developers to get the size they need seamlessly.

While carrying this out, we'll follow the best practices for custom elements where applicable.

@paulirish
Copy link
Owner

Yah this seems required. Web.dev used a variant on my approach which handled dimensions better than me.

@paulirish paulirish changed the title Allow easy modification of the height and width of the video make it responsive Nov 18, 2019
@paulirish
Copy link
Owner

web.dev uses this padding-top trick (which is written explicitly for the youtube case) https://blog.theodo.com/2018/01/responsive-iframes-css-trick/

although i like chris's adaptation in https://css-tricks.com/responsive-iframes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants