- Enables dynamic line-height based on font-size

This commit is contained in:
Vlad
2016-04-08 15:16:11 -04:00
parent 813db1ae33
commit ba40437eb9
5 changed files with 26 additions and 11 deletions

View File

@ -95,7 +95,7 @@ class Text {
$line_breaks = ($next_element && preg_match('/<li>/i', $next_element->getInnerText())) ? '<br />' : $line_breaks;
$paragraph->html('
<tr>
<td class="mailpoet_paragraph" style="line-height:' . StylesHelper::$line_height . ';word-break:break-word;word-wrap:break-word;' . $style . '">
<td class="mailpoet_paragraph" style="word-break:break-word;word-wrap:break-word;' . $style . '">
' . $contents . $line_breaks . '
</td>
</tr>'
@ -117,7 +117,7 @@ class Text {
$list->class = 'mailpoet_paragraph';
$list->style .= 'padding-top:0;padding-bottom:0;margin-top:10px;';
}
$list->style .= 'margin-bottom:10px;line-height:' . StylesHelper::$line_height . ';';
$list->style .= 'margin-bottom:10px;';
}
return $DOM->__toString();
}
@ -128,7 +128,7 @@ class Text {
$headings = $DOM->query('h1, h2, h3, h4');
if(!$headings->count()) return $html;
foreach($headings as $heading) {
$heading->style .= 'line-height:' . StylesHelper::$line_height . ';padding:0;font-style:normal;font-weight:normal;';
$heading->style .= 'padding:0;font-style:normal;font-weight:normal;';
}
return $DOM->__toString();
}