Render submit button gradient on front end

[MAILPOET-3005]
This commit is contained in:
Rostislav Wolny
2020-07-02 16:25:25 +02:00
committed by Veljko V
parent 74ad8c4952
commit 12dff2c34d
2 changed files with 16 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class BlockStylesRenderer {
if (isset($styles['full_width']) && intval($styles['full_width'])) {
$rules[] = 'width:100%;';
}
if (isset($styles['background_color'])) {
if (isset($styles['background_color']) && empty($styles['gradient'])) {
$rules[] = "background-color:{$styles['background_color']};";
}
if (isset($styles['border_size']) || isset($styles['border_radius']) || isset($styles['border_color'])) {
@ -56,6 +56,9 @@ class BlockStylesRenderer {
if (!isset($styles['border_color'])) {
$rules[] = "border-color:transparent;";
}
if (!empty($styles['gradient'])) {
$rules[] = "background: {$styles['gradient']};";
}
if (isset($styles['bold']) && $styles['bold'] === '1') {
$rules[] = "font-weight:bold;";
}