Skip to content

Commit

Permalink
Respect prefers-reduced-motion: reduce (#9352)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand authored Apr 13, 2020
1 parent 385dd47 commit 82dcebe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/core/components/AMInstallButton/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
[dir='rtl'] & {
animation-name: move-rtl;
}

// Center the blue ball when we disable animations.
@media (prefers-reduced-motion: reduce) {
@include margin-start(14px);

animation: none;
}
}

.AMInstallButton-loader-ball {
Expand All @@ -112,6 +119,10 @@
border-radius: 50%;
height: $height;
width: $width;

@media (prefers-reduced-motion: reduce) {
animation: none;
}
}
}

Expand All @@ -124,6 +135,11 @@

.AMInstallButton-loader-container {
@include margin-start(16px);

// Center the blue ball when we disable animations.
@media (prefers-reduced-motion: reduce) {
@include margin-start(22px);
}
}
}
}
4 changes: 4 additions & 0 deletions src/ui/components/LoadingText/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@
1.5}s
infinite
cubic-bezier(0.65, 0.05, 0.36, 1);

@media (prefers-reduced-motion: reduce) {
animation: none;
}
}
}

0 comments on commit 82dcebe

Please sign in to comment.