Use container div to correctly size preview iframe#991
Merged
outoftime merged 1 commit intopopcodeorg:masterfrom Aug 17, 2017
Merged
Use container div to correctly size preview iframe#991outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime merged 1 commit intopopcodeorg:masterfrom
Conversation
Fun fact: [you can’t use `top`/`left`/`right`/`bottom` to size an absolutely-positioned iframe!](https://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height). You need to give iframes explicit `height` and `width`, full stop. The solution is pretty simple—add a container `<div>` that we size using the absolute position boundaries, then give the iframe a `height` and `width` of 100%.
Contributor
Author
|
@pwjablonski FYI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fun fact: you can’t use
top/left/right/bottomto size an absolutely-positioned iframe!. You need to give iframes explicitheightandwidth, full stop.The solution is pretty simple—add a container
<div>that we size using the absolute position boundaries, then give the iframe aheightandwidthof 100%.Fixes #989
Fixes #990