diff --git a/packages/block-editor/src/components/default-block-appender/content.scss b/packages/block-editor/src/components/default-block-appender/content.scss index 51e0b4381a15d..a16c4c279c194 100644 --- a/packages/block-editor/src/components/default-block-appender/content.scss +++ b/packages/block-editor/src/components/default-block-appender/content.scss @@ -24,20 +24,11 @@ .block-editor-default-block-appender__content { // Set the opacity of the initial block appender to the same as placeholder text in an empty Paragraph block. opacity: 0.62; - } - - // In "constrained" layout containers, the first and last paragraphs have their margins zeroed out. - // In the case of this appender, it needs to apply those same rules to avoid layout shifts. - // Such shifts happen when the bottom margin of the Title block has been set to less than the default 1em margin of paragraphs. - :where(body .is-layout-constrained) &, - :where(.wp-site-blocks) & { - > :first-child { - margin-block-start: 0; - margin-block-end: 0; - } - // Since this appender will only ever appear on an entirely empty document, we don't account for last-child. - // This is also because it will never be the last child, the block inserter that sits in this appender is the last child. + // The following prevents user agent styles from applying margins to the appender's inner paragraph. + // This in turn prevents layout shift due to layout styles removing margins from first and last children. + margin-block-start: 0; + margin-block-end: 0; } // Dropzone.