Skip to content

Commit

Permalink
Fix Overlay easing animation (#2269)
Browse files Browse the repository at this point in the history
* Fix overlay easing animation

* Create empty-hornets-kick.md

Co-authored-by: Katie Langerman <langermank@github.com>
  • Loading branch information
vdepizzol and langermank committed Sep 30, 2022
1 parent 2e2bc71 commit 27266fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-hornets-kick.md
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Fix Overlay easing animation
16 changes: 13 additions & 3 deletions src/overlay/overlay.scss
Expand Up @@ -352,7 +352,7 @@ $primer-borderRadius-large: 0.75rem;
border-bottom-left-radius: 0;

@media screen and (prefers-reduced-motion: no-preference) {
animation: 160ms cubic-bezier(0.32, 0, 0.67, 0) 0s 1 normal none running Overlay--motion-slideInRight;
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideInRight;
}
}
}
Expand All @@ -369,7 +369,7 @@ $primer-borderRadius-large: 0.75rem;
border-bottom-right-radius: 0;

@media screen and (prefers-reduced-motion: no-preference) {
animation: 160ms cubic-bezier(0.32, 0, 0.67, 0) 0s 1 normal none running Overlay--motion-slideInLeft;
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideInLeft;
}
}
}
Expand All @@ -387,7 +387,7 @@ $primer-borderRadius-large: 0.75rem;
border-bottom-left-radius: 0;

@media screen and (prefers-reduced-motion: no-preference) {
animation: 160ms cubic-bezier(0.32, 0, 0.67, 0) 0s 1 normal none running Overlay--motion-slideUp;
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideUp;
}
}
}
Expand All @@ -400,6 +400,10 @@ $primer-borderRadius-large: 0.75rem;
border-radius: $primer-borderRadius-large;
border-top-left-radius: 0;
border-top-right-radius: 0;

@media screen and (prefers-reduced-motion: no-preference) {
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideDown;
}
}
}
}
Expand Down Expand Up @@ -455,6 +459,12 @@ $primer-borderRadius-large: 0.75rem;
}
}

@keyframes Overlay--motion-slideDown {
from {
transform: translateY(-100%);
}
}

@keyframes Overlay--motion-slideUp {
from {
transform: translateY(100%);
Expand Down

0 comments on commit 27266fc

Please sign in to comment.