diff --git a/assets/css/src/components/_public.scss b/assets/css/src/components/_public.scss index d51a43799e..d7e690d981 100644 --- a/assets/css/src/components/_public.scss +++ b/assets/css/src/components/_public.scss @@ -71,7 +71,7 @@ $form-block-margin: 20px; @mixin maxWidthColumns() { flex-wrap: wrap; - &.mailpoet_column_has_background .mailpoet_form_column:last-child .mailpoet_paragraph:last-child { + &.mailpoet_column_with_background .mailpoet_form_column:last-child .mailpoet_paragraph:last-child { margin-bottom: 0 !important; } } @@ -129,7 +129,7 @@ $form-block-margin: 20px; } @media (min-width: $form-break-small-width) { - .mailpoet_form_form:not(.mailpoet_form_tight_container) .mailpoet_column_has_background & .mailpoet_paragraph:last-child { + .mailpoet_form_form:not(.mailpoet_form_tight_container) .mailpoet_column_with_background & .mailpoet_paragraph:last-child { margin-bottom: 0 !important; } } diff --git a/lib/Form/Block/Columns.php b/lib/Form/Block/Columns.php index 937f23d6b2..94919f8ae1 100644 --- a/lib/Form/Block/Columns.php +++ b/lib/Form/Block/Columns.php @@ -28,9 +28,9 @@ class Columns { } if (!empty($params['background_color'])) { $classes[] = "has-{$params['background_color']}-background-color"; - $classes[] = "mailpoet_column_has_background"; + $classes[] = "mailpoet_column_with_background"; } elseif (!empty($params['custom_background_color'])) { - $classes[] = "mailpoet_column_has_background"; + $classes[] = "mailpoet_column_with_background"; } if (!empty($params['text_color'])) { $classes[] = "has-{$params['text_color']}-color"; diff --git a/lib/Form/Util/Styles.php b/lib/Form/Util/Styles.php index 96805b0c1d..155f47f9f5 100644 --- a/lib/Form/Util/Styles.php +++ b/lib/Form/Util/Styles.php @@ -12,7 +12,7 @@ class Styles { } /* columns */ -.mailpoet_column_has_background { +.mailpoet_column_with_background { padding: 10px; } /* space between columns */ diff --git a/tests/unit/Form/Block/ColumnsTest.php b/tests/unit/Form/Block/ColumnsTest.php index e237bd39a2..4c66985d99 100644 --- a/tests/unit/Form/Block/ColumnsTest.php +++ b/tests/unit/Form/Block/ColumnsTest.php @@ -46,7 +46,7 @@ class ColumnsTest extends \MailPoetUnitTest { $column = $this->htmlParser->getElementByXpath($html, '//div[1]'); $class = $this->htmlParser->getAttribute($column, 'class'); expect($class->textContent)->contains('has-vivid-red-background-color'); - expect($class->textContent)->contains('mailpoet_column_has_background'); + expect($class->textContent)->contains('mailpoet_column_with_background'); } public function testItShouldRenderTextColorClass() { @@ -75,7 +75,7 @@ class ColumnsTest extends \MailPoetUnitTest { $style = $this->htmlParser->getAttribute($columns, 'style'); expect($style->textContent)->contains('background-color:#ffffff;'); $class = $this->htmlParser->getAttribute($columns, 'class'); - expect($class->textContent)->contains('mailpoet_column_has_background'); + expect($class->textContent)->contains('mailpoet_column_with_background'); } public function testItShouldCustomTextColor() {