Implement margin-top for core block renderers
[MAILPOET-5816]
This commit is contained in:
committed by
Rostislav Wolný
parent
eed1dbb695
commit
fc79e3eee9
@@ -30,6 +30,8 @@ class FlexLayoutRenderer {
|
||||
|
||||
$wpGeneratedStyles = wp_style_engine_get_styles($parsedBlock['attrs']['style'] ?? []);
|
||||
$styles = $wpGeneratedStyles['css'] ?? '';
|
||||
$marginTop = $parsedBlock['email_attrs']['margin-top'] ?? '0px';
|
||||
$styles .= 'margin-top: ' . $marginTop . ';';
|
||||
$justify = esc_attr($parsedBlock['attrs']['layout']['justifyContent'] ?? 'left');
|
||||
$styles .= 'text-align: ' . $justify;
|
||||
$outputHtml = str_replace('{style}', $styles, $outputHtml);
|
||||
|
Reference in New Issue
Block a user