diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index f3387aa1f2954..840caf0961d78 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -59,8 +59,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { ?> > * { max-width: ; - margin-left: auto; - margin-right: auto; + margin-left: auto !important; + margin-right: auto !important; } > .alignwide { diff --git a/packages/block-editor/src/components/block-list/layout.js b/packages/block-editor/src/components/block-list/layout.js index 3f898ae12c02f..e29fb8ab05cca 100644 --- a/packages/block-editor/src/components/block-list/layout.js +++ b/packages/block-editor/src/components/block-list/layout.js @@ -43,8 +43,8 @@ export function LayoutStyle( { selector, layout = {} } ) { ? ` ${ appendSelectors( selector, '> *' ) } { max-width: ${ contentSize ?? wideSize }; - margin-left: auto; - margin-right: auto; + margin-left: auto !important; + margin-right: auto !important; } ${ appendSelectors( selector, '> [data-align="wide"]' ) } {