Skip to content

Commit

Permalink
Update modal animation (WordPress#64580)
Browse files Browse the repository at this point in the history
Unlinked contributors: nick-a8c.

Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: hanneslsm <hanneslsm@git.wordpress.org>
Co-authored-by: paaljoachim <paaljoachim@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
  • Loading branch information
9 people authored and bph committed Aug 31, 2024
1 parent 9b87708 commit 436fdb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/base-styles/_animations.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@mixin edit-post__fade-in-animation($speed: 0.2s, $delay: 0s) {
animation: edit-post__fade-in-animation $speed ease-out $delay;
@mixin edit-post__fade-in-animation($speed: 0.08s, $delay: 0s) {
animation: edit-post__fade-in-animation $speed linear $delay;
animation-fill-mode: forwards;
@include reduce-motion("animation");
}
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- `TimePicker` (on the inputs)
- `TreeSelect`
- `UnitControl`
- `Modal`: Update animation effect ([#64580](https://github.com/WordPress/gutenberg/pull/64580)).

### Bug Fixes

Expand Down
9 changes: 5 additions & 4 deletions packages/components/src/modal/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
background-color: rgba($black, 0.35);
z-index: z-index(".components-modal__screen-overlay");
display: flex;
// backdrop-filter: blur($grid-unit);
// This animates the appearance of the white background.
@include edit-post__fade-in-animation();
}
Expand All @@ -26,7 +25,7 @@
// Have the content element fill the vertical space yet not overflow.
display: flex;
// Animate the modal frame/contents appearing on the page.
animation: components-modal__appear-animation 0.1s ease-out;
animation: components-modal__appear-animation 0.26s cubic-bezier(0.29, 0, 0, 1);
animation-fill-mode: forwards;
@include reduce-motion("animation");

Expand Down Expand Up @@ -80,10 +79,12 @@

@keyframes components-modal__appear-animation {
from {
transform: translateY($grid-unit-40);
opacity: 0;
transform: scale(0.9);
}
to {
transform: translateY(0);
opacity: 1;
transform: scale(1);
}
}

Expand Down

0 comments on commit 436fdb3

Please sign in to comment.