- Updates button height calculation

- Removes background color when it's set to "transparent"
- Removes second line break from paragraphs
- Introduces other changes based on Becks's testing
- Updates unit tests
This commit is contained in:
Vlad
2016-03-31 15:23:30 -04:00
parent 4486f9c5b0
commit 4f30158722
8 changed files with 51 additions and 31 deletions

View File

@@ -17,9 +17,14 @@ class Header {
}
}
}
$background_color = $element['styles']['block']['backgroundColor'];
$background_color = ($background_color !== 'transparent') ?
'bgcolor="' . $background_color . '"' :
false;
if(!$background_color) unset($element['styles']['block']['backgroundColor']);
$template = '
<tr>
<td class="mailpoet_header_footer_padded mailpoet_header" bgcolor="' . $element['styles']['block']['backgroundColor'] . '"
<td class="mailpoet_header_footer_padded mailpoet_header" ' . $background_color . '
style="' . StylesHelper::getBlockStyles($element) . StylesHelper::getStyles($element['styles'], 'text') . '">
' . $DOM->html() . '
</td>