Skip to content

Commit

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

Co-authored-by: jameskoster <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: tyxla <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: hanneslsm <[email protected]>
Co-authored-by: paaljoachim <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: jasmussen <[email protected]>
  • Loading branch information
9 people authored Aug 29, 2024
1 parent 70b257a commit 520fa41
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

1 comment on commit 520fa41

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 520fa41.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10620388303
📝 Reported issues:

Please sign in to comment.