Skip to content

Commit

Permalink
VisualEditor: Always output has-global-padding classname when in post…
Browse files Browse the repository at this point in the history
… only mode and the site supports root padding aware alignments (WordPress#66626)

Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
4 people authored and karthick-murugan committed Nov 13, 2024
1 parent 3a76ce4 commit 8f3dcc7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/editor/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down

0 comments on commit 8f3dcc7

Please sign in to comment.