diff --git a/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Group.php b/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Group.php index 9803b1ff6c..197bf2785d 100644 --- a/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Group.php +++ b/mailpoet/lib/EmailEditor/Integrations/Core/Renderer/Blocks/Group.php @@ -30,9 +30,7 @@ class Group extends AbstractBlockRenderer { 'backgroundColor' => '', 'textColor' => '', 'borderColor' => '', - 'layout' => [ - 'justifyContent' => '', - ], + 'layout' => [], ]); // Layout, background, borders need to be on the outer table element. @@ -52,9 +50,9 @@ class Group extends AbstractBlockRenderer { 'spacing' => [ 'padding' => $blockAttributes['style']['spacing']['padding'] ?? [] ], ])['declarations']; - if (empty($tableStyles['background-size'])) { - $tableStyles['background-size'] = 'cover'; - } + $tableStyles['background-size'] = empty($tableStyles['background-size']) ? 'cover' : $tableStyles['background-size']; + $justifyContent = $blockAttributes['layout']['justifyContent'] ?? 'center'; + $width = $parsedBlock['email_attrs']['width'] ?? '100%'; return sprintf( '