diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index d47eaba1309def..871cad2c20022a 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -54,7 +54,7 @@ function gutenberg_get_layout_style( $selector, $layout, $padding, $has_block_ga $all_max_width_value = wp_strip_all_tags( explode( ';', $all_max_width_value )[0] ); $wide_max_width_value = wp_strip_all_tags( explode( ';', $wide_max_width_value )[0] ); - if ( $padding ) { + if ( $content_size || $wide_size ) { $style = "$selector {"; // Using important here to override the inline padding that could be potentially // applied using the custom padding control before the layout inheritance is applied.