-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixed some Embed's width in the editor. #6212
Conversation
Yup. Works for me! Nice work. 👍 👍 |
@@ -142,6 +142,9 @@ class Sandbox extends Component { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
body > div > iframe { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the above body.video > div > iframe
now redundant with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aduth ,
Isn't the above body.video > div > iframe now redundant with this?
The part that applies width is, but the rule also sets height for videos and is not applying just to the equivalent selector (body > div > iframe / body.video > div > iframe) but also to other selectors. The equivalent rules without redundancy would be:
body.video,
body.video > div,
body.video > div > iframe {
height: 100%;
}
body.video,
body.video > div,
body > div > iframe {
width: 100%;
}
or
body.video,
body.video > div,
width: 100%;
height: 100%;
}
body.video > div > iframe {
height: 100%;
}
body > div > iframe {
width: 100%;
}
Both alternatives seem worse compared to what we have so preferred to keep selectors for video different from the general ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, I missed the other style.
Still, it seems odd that there's overlap, with some styles targeting video specifically, if it's more of a general issue with iframes in embedded content.
Description
This Pr corrects a style rule so the non-video embed's also become responsive (videos like youtube already were).
Fixes: #5757
How has this been tested?
Verify the problem described in #5757 does not happen and the embed correctly resizes to the available space.