Skip to content

Commit

Permalink
Edit Post: Standardize reduced motion handling using media queries (W…
Browse files Browse the repository at this point in the history
…ordPress#68426)

Co-authored-by: im3dabasia <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
3 people authored and Gulamdastgir-Momin committed Jan 23, 2025
1 parent b4ebd95 commit 566e243
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/edit-post/src/components/back-button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
}

&::before {
transition: box-shadow 0.1s ease;
@include reduce-motion("transition");
@media not (prefers-reduced-motion) {
transition: box-shadow 0.1s ease;
}
content: "";
display: block;
position: absolute;
Expand Down
5 changes: 3 additions & 2 deletions packages/edit-post/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@
width: inherit;
height: $grid-unit-05;
border-radius: $radius-small;
transition: width 0.3s ease-out;
@include reduce-motion("transition");
@media not (prefers-reduced-motion) {
transition: width 0.3s ease-out;
}
}
}

Expand Down

0 comments on commit 566e243

Please sign in to comment.