From fbdc0f97dc463f2a2860de10b8d08cda3d8f69da Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:15:11 +1100 Subject: [PATCH] VisualEditor: Always output has-global-padding classname when in post only mode and the site supports root padding aware alignments (#66626) Co-authored-by: andrewserong Co-authored-by: ramonjd Co-authored-by: jasmussen --- packages/editor/src/components/visual-editor/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/visual-editor/index.js b/packages/editor/src/components/visual-editor/index.js index 6a5466a265c3eb..795a4f983f1536 100644 --- a/packages/editor/src/components/visual-editor/index.js +++ b/packages/editor/src/components/visual-editor/index.js @@ -462,7 +462,13 @@ function VisualEditor( { renderingMode !== 'post-only' || isDesignPostType ? 'wp-site-blocks' - : `${ blockListLayoutClass } wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules. + : `${ blockListLayoutClass } wp-block-post-content`, // Ensure root level blocks receive default/flow blockGap styling rules. + { + 'has-global-padding': + renderingMode === 'post-only' && + ! isDesignPostType && + hasRootPaddingAwareAlignments, + } ) } layout={ blockListLayout } dropZoneElement={