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 responsive-video to play nice with flexbox and grid #136

Open
ashleykolodziej opened this issue Mar 26, 2018 · 0 comments
Open

Update responsive-video to play nice with flexbox and grid #136

ashleykolodziej opened this issue Mar 26, 2018 · 0 comments

Comments

@ashleykolodziej
Copy link
Contributor

Right now, if you include a responsive video in a flexbox or grid layout, it will behave wildly differently between Chrome, Firefox, IE, and Safari. This is because none of these browsers deal with padding in quite the same way when it comes to flexbox and grid. See https://stackoverflow.com/questions/23717953/padding-bottom-top-in-flexbox-layout

The accepted answer there was to just use something besides padding, like height - but an answer further down moves the padding to a pseudo-element. This actually works pretty great and keeps the same aspect ratio. Updating this in our responsive video class will make it compatible with newer layouts.

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

No branches or pull requests

1 participant