Add gradient rendering to columns on front end

[MAILPOET-3005]
This commit is contained in:
Rostislav Wolny
2020-07-02 16:14:48 +02:00
committed by Veljko V
parent 3eb6513b0a
commit 4d1fbcd157
2 changed files with 18 additions and 4 deletions

View File

@ -12,9 +12,12 @@ class Columns {
if (isset($params['text_color'])) {
$styles[] = "color:{$params['text_color']};";
}
if (isset($params['background_color'])) {
if (isset($params['background_color']) && !isset($params['gradient'])) {
$styles[] = "background-color:{$params['background_color']};";
}
if (isset($params['gradient'])) {
$styles[] = "background:{$params['gradient']};";
}
if (count($styles)) {
return ' style="' . implode('', $styles) . '"';
}
@ -26,7 +29,7 @@ class Columns {
if (!empty($params['vertical_alignment'])) {
$classes[] = "mailpoet_vertically_align_{$params['vertical_alignment']}";
}
if (!empty($params['background_color'])) {
if (!empty($params['background_color']) || !empty($params['gradient'])) {
$classes[] = "mailpoet_column_with_background";
}
if (!empty($params['text_color'])) {