Change class name for columns with background
[MAILPOET-2609]
This commit is contained in:
committed by
Pavel Dohnal
parent
23a8a46858
commit
772df80f01
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -12,7 +12,7 @@ class Styles {
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_has_background {
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
|
@ -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() {
|
||||
|
Reference in New Issue
Block a user