Skip to content

Commit

Permalink
Add important to auto layout margins
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed May 11, 2021
1 parent 69f16ec commit a3c0200
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
?>
<?php echo '.wp-container-' . $id; ?> > * {
<?php echo esc_html( safecss_filter_attr( $all_max_width_declaration ) ); ?>;
margin-left: auto;
margin-right: auto;
margin-left: auto !important;
margin-right: auto !important;
}

<?php echo '.wp-container-' . $id; ?> > .alignwide {
Expand Down
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/block-list/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]' ) } {
Expand Down

0 comments on commit a3c0200

Please sign in to comment.