- Adds new 'fontWeight' property
- Limits max button width to column width - Adds bold option to buttons
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
<?php
|
||||
namespace MailPoet\Newsletter\Renderer\Blocks;
|
||||
|
||||
use MailPoet\Newsletter\Renderer\Columns\ColumnsHelper;
|
||||
use MailPoet\Newsletter\Renderer\StylesHelper;
|
||||
|
||||
class Button {
|
||||
static function render($element) {
|
||||
static function render($element, $column_count) {
|
||||
$column_width = ColumnsHelper::columnWidth($column_count);
|
||||
$column_width = $column_width - (StylesHelper::$padding_width * 2);
|
||||
$element['styles']['block']['width'] =
|
||||
((int) $element['styles']['block']['width'] > $column_width) ?
|
||||
$column_width . 'px' :
|
||||
$element['styles']['block']['width'];
|
||||
$template = '
|
||||
<tr>
|
||||
<td class="mailpoet_padded" valign="top">
|
||||
|
@@ -11,6 +11,7 @@ class StylesHelper {
|
||||
'textDecoration' => 'text-decoration',
|
||||
'textAlign' => 'text-align',
|
||||
'fontSize' => 'font-size',
|
||||
'fontWeight' => 'font-weight',
|
||||
'borderWidth' => 'border-width',
|
||||
'borderStyle' => 'border-style',
|
||||
'borderColor' => 'border-color',
|
||||
|
Reference in New Issue
Block a user