From 4924eff8150bac503f318a80af283c1e57936baa Mon Sep 17 00:00:00 2001 From: andrei draganescu Date: Wed, 15 Apr 2020 17:13:48 +0300 Subject: [PATCH] Fixes overlaping column contents for embeds (#21570) * 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 --- packages/block-library/src/embed/editor.scss | 11 ----------- packages/block-library/src/embed/style.scss | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/block-library/src/embed/editor.scss b/packages/block-library/src/embed/editor.scss index 342b4fe1b116b..f84b5b886bd10 100644 --- a/packages/block-library/src/embed/editor.scss +++ b/packages/block-library/src/embed/editor.scss @@ -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; diff --git a/packages/block-library/src/embed/style.scss b/packages/block-library/src/embed/style.scss index 4abaf5b7778f5..0905f04dd8e4e 100644 --- a/packages/block-library/src/embed/style.scss +++ b/packages/block-library/src/embed/style.scss @@ -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.