Skip to content

Commit

Permalink
Fix: Added notify and drawer default CSS animations
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster committed Oct 29, 2024
1 parent 324b1fa commit 0b389bf
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
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 @duration ease-in, right @duration ease-in, transform @duration ease-in, opacity @duration ease-in;);
opacity: 0;

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

.dir-rtl &:not(.is-position-right),
&.is-position-left {
&.anim-open-after {
opacity: 1;
}
&.anim-close-after {
opacity: 0;
}
}
}
38 changes: 37 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,40 @@
.transition(background-color @duration ease-in, color @duration ease-in;);
}
}


.notify:not(.disable-animation) > .notify__popup {
.transition(margin-top @duration, top @duration, transform @duration ease-in, opacity @duration ease-in, height @duration ease-in;);
opacity: 0;

.anim-open-before& {
opacity: 0;
}

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

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

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

.anim-open-before& {
opacity: 0;
}

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

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

0 comments on commit 0b389bf

Please sign in to comment.