Commit f1f740be authored by Martijn Cuppens's avatar Martijn Cuppens Committed by Patrick H. Lauke
Browse files

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

Make progress animation respect `$enable-transitions` and `prefers-reduced-motion` media query
parent 8eb8b8d3
Showing with 14 additions and 5 deletions
+14 -5
@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 {
......@@ -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;
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment