Skip to content

Commit

Permalink
Modal: Standardize reduced motion handling using media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
SainathPoojary committed Jan 3, 2025
1 parent 147e9bb commit 7ea0752
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/components/src/modal/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
display: flex;
// Animate the modal frame/contents appearing on the page.
animation-name: components-modal__appear-animation;
animation-duration: var(--modal-frame-animation-duration);
animation-fill-mode: forwards;
animation-timing-function: cubic-bezier(0.29, 0, 0, 1);
@include reduce-motion("animation");

@media not (prefers-reduced-motion) {
animation-duration: var(--modal-frame-animation-duration);
}

.components-modal__screen-overlay.is-animating-out & {
animation-name: components-modal__disappear-animation;
Expand Down

0 comments on commit 7ea0752

Please sign in to comment.