Adding responsiveness to BlockIframeEmbed #161
Merged
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.
Checklist
Description
This PR adds responsive embeds to
BlockIframeEmbed
using the same strategy as in WWW. To keep this clean, it made sense to create a newBaseIframe
component and use that within certain contexts inBlockIframeEmbed
.BaseIframe
w/ stories. I thinkBaseIframe
falls into the "mixin" category, so I think we can rename it when implementing Rename and reorganize components #130./src/scss/components/_BlockIframeEmbed.scss
to_BaseIframe.scss
as the class applies directly to the iframe, not the blockBlockIframeEmbed
to useBaseImagePlaceholder
withBaseIframe
to default to a responsive 16:9 embed. If a height is provided, then it will override the aspect ratio.Breaking changes / Migration notes
BlockIframeEmbed
is now responsive for 16:9 embeds! However, you will need to make the following changes to your project:BlockIframeEmbed
has changed and you will need to update the markup in your projects.BlockIframeEmbed
has been renamed to_BaseIframe.scss
, so you will need to update your scss imports if you are using Explorer 1 a la carte.Instructions to test
Note:
dist
has already been rebuilt.npm run storybook
Tested in the following environments/browsers:
Operating System
Browser