Always animate overlay

[MAILPOET-3088]
This commit is contained in:
Pavel Dohnal
2020-09-10 09:43:16 +02:00
committed by Veljko V
parent 24e562a716
commit 9770840392
2 changed files with 14 additions and 14 deletions

View File

@@ -1,3 +1,16 @@
.mailpoet_form_overlay_animation {
animation: fade-in-overlay 1s 1 cubic-bezier(.77, 0, .175, 1);
}
@keyframes fade-in-overlay {
0% {
opacity: 0;
}
100% {
opacity: .7;
}
}
.mailpoet_form_animation_slideup {
animation: slide-up 1s 1 cubic-bezier(.77, 0, .175, 1);
@@ -35,10 +48,6 @@
animation: fade-in 1s 1 cubic-bezier(.77, 0, .175, 1);
}
.mailpoet_form_overlay_animation_fadein {
animation: fade-in-overlay 1s 1 cubic-bezier(.77, 0, .175, 1);
}
@keyframes fade-in {
0% {
opacity: 0;
@@ -49,16 +58,6 @@
}
}
@keyframes fade-in-overlay {
0% {
opacity: 0;
}
100% {
opacity: .7;
}
}
.mailpoet_form_animation_slideright {
animation: slide-right 1s 1 cubic-bezier(.77, 0, .175, 1);
}

View File

@@ -89,6 +89,7 @@ jQuery(($) => {
if (animation !== '') {
formDiv.addClass(`mailpoet_form_animation_${animation}`);
formDiv.prev('.mailpoet_form_popup_overlay').addClass(`mailpoet_form_overlay_animation_${animation}`);
formDiv.prev('.mailpoet_form_popup_overlay').addClass(`mailpoet_form_overlay_animation`);
}
const background = form.data('background-color');
formDiv.css('background-color', background || 'white');