Skip to content

Commit

Permalink
remove motion when reduced-motion is enabled (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
rezrah authored Oct 31, 2024
1 parent b596487 commit 2928995
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-socks-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react-brand': patch
---

Disabled all transitions and auto-staggering when `reduced-motion` user preference is enabled
5 changes: 5 additions & 0 deletions .changeset/wet-peas-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react-brand': patch
---

Removed negative margin from `RiverStoryScroll` when `reduced-motion` user preference is enabled
5 changes: 2 additions & 3 deletions packages/react/src/css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ select {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
animation: none !important;
transition: none !important;
scroll-behavior: auto !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
}
}

@media screen and (min-width: 768px) and (min-height: 900px) {
@media screen and (min-width: 768px) and (min-height: 900px) and (prefers-reduced-motion: no-preference) {
.RiverStoryScroll {
margin-top: -20vh;
}
Expand Down

0 comments on commit 2928995

Please sign in to comment.