Move last paragraph styles to be more specific

[MAILPOET-2964]
This commit is contained in:
Pavel Dohnal
2020-06-15 12:43:22 +02:00
committed by Veljko V
parent cee3516dc6
commit c4cea7335b
2 changed files with 4 additions and 11 deletions

View File

@ -84,11 +84,6 @@ $form-columns-space-between: 20px;
} }
.mailpoet_form_fixed_bar { .mailpoet_form_fixed_bar {
// in fixed form bar we want to remove the bottom margins of all last paragraphs to keep the height of the bar small
.mailpoet_paragraph.last {
margin-bottom: 0;
}
@include breakpoint-min-width($form-break-small-width) { @include breakpoint-min-width($form-break-small-width) {
.mailpoet_form_columns .mailpoet_form_column .mailpoet_paragraph:last-child { .mailpoet_form_columns .mailpoet_form_column .mailpoet_paragraph:last-child {
margin-bottom: 0; margin-bottom: 0;
@ -97,11 +92,6 @@ $form-columns-space-between: 20px;
} }
div.mailpoet_form:not(.mailpoet_form_fixed_bar) { div.mailpoet_form:not(.mailpoet_form_fixed_bar) {
// we want to remove the bottom margins of all last paragraphs to keep the height of the bar small
.mailpoet_paragraph.last {
margin-bottom: 0;
}
@include breakpoint-min-width($form-break-small-width) { @include breakpoint-min-width($form-break-small-width) {
.mailpoet_paragraph:last-child, .mailpoet_paragraph:last-child,
.mailpoet_paragraph p:last-child { .mailpoet_paragraph p:last-child {
@ -239,8 +229,8 @@ div.mailpoet_form_popup {
.mailpoet_form_close_icon { .mailpoet_form_close_icon {
cursor: pointer; cursor: pointer;
display: block; display: block;
margin: 0 0 0 auto;
float: right; float: right;
margin: 0 0 0 auto;
} }
div.mailpoet_form_fixed_bar { div.mailpoet_form_fixed_bar {

View File

@ -194,11 +194,14 @@ EOL;
$messagesStyles = $this->renderMessagesStyles($formSettings, $selector); $messagesStyles = $this->renderMessagesStyles($formSettings, $selector);
$additionalStyles = $selector . ' .mailpoet_paragraph.last {margin-bottom: 0}';
return $formWrapperStyles return $formWrapperStyles
. $formElementStyles . $formElementStyles
. $widthStyles . $widthStyles
. $messagesStyles . $messagesStyles
. $typeSpecificStyles . $typeSpecificStyles
. $additionalStyles
. $media; . $media;
} }