-
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
Fixes overlaping column contents for embeds #21570
Conversation
I don't know why the min-width was 360px but setting it to 100% seems to both fix this and not create other issues.
Size Change: +6 B (0%) Total Size: 839 kB
ℹ️ View Unchanged
|
Aside from the comment about the width I left, this does seem like the right approach. To elaborate, the min-width was added because some embeds aren't fully responsive, and that is out of our control as the oembed code and responsiveness is the prerogative of each embed provider. For example, some amazon embeds really don't work below a certain slot. However instead of dumbing down the embed block per the lowest common denominator, we should remove that rule and let people open individual tickets on a per-embed basis. |
@jasmussen could you code review and approve this as well if everything is all right? :) |
ON IT! |
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.
So as it turns out, the rule you removed WAS appropriate to remove. But that a separate regression had happened.
Embeds that are responsive have no intrinsic dimensions. Which means if they are floated, they collapse to zero. So we do actually have to set either a min-width, or a width: 100% + max-width, when they are floated.
The CSS rules for handling that already existed in style.css, but had gotten out of date with recent float refactors in the editor, so I fixed that up.
Approving because this is good, but please sanity check the CSS and test it with a floated embed. Here's what I see:
I retested with a floated embed as well and everything appears to look OK! |
Description
Closes #12283
I don't know why the min-width was 360px but setting it to 100% seems to both fix this and not create other issues.
How has this been tested?
Tested locally by:
Screenshots
Types of changes
Non breaking (from testing) CSS update for the embed block's editor CSS.