Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make progress animation respect $enable-transitions and prefers-reduced-motion media query #27986

Merged
merged 5 commits into from
Jan 15, 2019
19 changes: 14 additions & 5 deletions scss/_progress.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@keyframes progress-bar-stripes {
from { background-position: $progress-height 0; }
to { background-position: 0 0; }
// Disable animation if transitions are disabled
@if $enable-transitions {
@keyframes progress-bar-stripes {
from { background-position: $progress-height 0; }
to { background-position: 0 0; }
}
}

.progress {
Expand Down Expand Up @@ -29,6 +32,12 @@
background-size: $progress-height $progress-height;
}

.progress-bar-animated {
animation: progress-bar-stripes $progress-bar-animation-timing;
@if $enable-transitions {
.progress-bar-animated {
animation: progress-bar-stripes $progress-bar-animation-timing;

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