Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Added notify and drawer default CSS animations #531

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
25 changes: 25 additions & 0 deletions less/core/drawer.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,28 @@
}
}
}

.drawer:not(.disable-animation) {
.transition(left var(--drawerDuration) @animation-easing, right var(--drawerDuration) @animation-easing, transform var(--drawerDuration) @animation-easing, opacity var(--drawerDuration) @animation-easing;);
oliverfoster marked this conversation as resolved.
Show resolved Hide resolved
opacity: 0;

&.is-position-auto,
&.is-position-right {
&.anim-show-after {
opacity: 1;
}
&.anim-hide-after {
opacity: 0;
}
}

.dir-rtl &:not(.is-position-right),
&.is-position-left {
&.anim-show-after {
opacity: 1;
}
&.anim-hide-after {
opacity: 0;
}
}
}
31 changes: 30 additions & 1 deletion less/core/notify.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
&__popup {
background-color: @notify;
color: @notify-inverted;
.transition(margin-top @duration, top @duration;);
}

&__popup-inner {
Expand Down Expand Up @@ -106,3 +105,33 @@
.transition(background-color @duration ease-in, color @duration ease-in;);
}
}


.notify:not(.disable-animation) > .notify__popup {
.transition(margin-top 0.4s @animation-easing, top 0.4s @animation-easing, transform 0.4s @animation-easing, opacity 0.4s @animation-easing, height 0.4s @animation-easing;);
opacity: 0;
transform: translateY(0%);

.anim-show-after& {
transform: translateY(-50%);
opacity: 1;
}

.anim-hide-after& {
transform: translateY(0%);
opacity: 0;
}
}

.notify:not(.disable-animation) > .notify__shadow {
.transition(opacity 0.4s @animation-easing;);
opacity: 0;

.anim-show-after& {
opacity: 1;
}

.anim-hide-after& {
opacity: 0;
}
}
13 changes: 13 additions & 0 deletions less/core/shadow.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
.shadow {
background-color: fade(@shadow, @shadow-opacity);
}

.shadow:not(.disable-animation) {
.transition(opacity @duration ease-in;);
opacity: 0;

&.anim-show-after {
opacity: 1;
}

&.anim-hide-after {
opacity: 0;
}
}