diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index f13539fd6aad0f..07ec3c9956dd8a 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -65,8 +65,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { ?> > * { ; - 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 3f898ae12c02fe..e29fb8ab05ccaa 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"]' ) } {