Skip to content

Commit

Permalink
Fixes overlaping column contents for embeds (#21570)
Browse files Browse the repository at this point in the history
* fixes overlaping column contents for embeds

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.

* removest the width of the embeds and the code that deactivated it for placeholders

* Fix collapsing floated embeds.

Co-authored-by: jasmussen <joen@automattic.com>
  • Loading branch information
draganescu and jasmussen committed Apr 15, 2020
1 parent f4c44cd commit 4924eff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions packages/block-library/src/embed/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
// therefore the video doesn't intrinsically clear floats like an image does.
clear: both;

// Apply a min-width, or the embed can collapse when floated.
// Instagram widgets have a min-width of 326px, so go a bit beyond that.
@include break-small() {
min-width: 360px;

// The placeholder should not have this min-width.
&.components-placeholder {
min-width: 0;
}
}

&.is-loading {
display: flex;
flex-direction: column;
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/embed/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Apply max-width to floated items that have no intrinsic width
.block-editor-block-list__block[data-type="core/embed"][data-align="left"],
.block-editor-block-list__block[data-type="core/embed"][data-align="right"],
.block-editor-block-list__block[data-type*="core-embed"][data-align="left"] .is-block-content,
.block-editor-block-list__block[data-type*="core-embed"][data-align="right"] .is-block-content,
.wp-block-embed.alignleft,
.wp-block-embed.alignright {
// Instagram widgets have a min-width of 326px, so go a bit beyond that.
Expand Down

0 comments on commit 4924eff

Please sign in to comment.