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

Try: Fix embed iframe sizing issue. #40213

Merged
merged 1 commit into from
Sep 6, 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
4 changes: 2 additions & 2 deletions packages/components/src/sandbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ const style = `
}
html,
body,
body > div,
body > div iframe {
body > div {
width: 100%;
}
html.wp-has-aspect-ratio,
body.wp-has-aspect-ratio,
body.wp-has-aspect-ratio > div,
body.wp-has-aspect-ratio > div iframe {
width: 100%;
Copy link
Contributor

@ntsekouras ntsekouras Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that wp-has-aspect-ratio class is added from embed block. Not added here of course, but should the related styles live in that block? 🤔

We are making a change here that affects an exposed component(Sandbox) and I'm not 100% sure that the style removed above couldn't affect some existing usages from third party plugins, etc..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. What's the best way forward, you think?

height: 100%;
overflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */
}
Expand Down