2020-05-19 16:53:54 +00:00
|
|
|
// Disable animation if transitions are disabled
|
2021-07-07 11:12:38 +00:00
|
|
|
|
|
|
|
// scss-docs-start progress-keyframes
|
2020-05-19 16:53:54 +00:00
|
|
|
@if $enable-transitions {
|
|
|
|
@keyframes progress-bar-stripes {
|
2021-07-07 11:12:38 +00:00
|
|
|
0% { background-position-x: $progress-height; }
|
2020-05-19 16:53:54 +00:00
|
|
|
}
|
|
|
|
}
|
2021-07-07 11:12:38 +00:00
|
|
|
// scss-docs-end progress-keyframes
|
2020-05-19 16:53:54 +00:00
|
|
|
|
|
|
|
.progress {
|
2022-11-04 15:49:41 +00:00
|
|
|
// scss-docs-start progress-css-vars
|
|
|
|
--#{$prefix}progress-height: #{$progress-height};
|
|
|
|
@include rfs($progress-font-size, --#{$prefix}progress-font-size);
|
|
|
|
--#{$prefix}progress-bg: #{$progress-bg};
|
|
|
|
--#{$prefix}progress-border-radius: #{$progress-border-radius};
|
|
|
|
--#{$prefix}progress-box-shadow: #{$progress-box-shadow};
|
|
|
|
--#{$prefix}progress-bar-color: #{$progress-bar-color};
|
|
|
|
--#{$prefix}progress-bar-bg: #{$progress-bar-bg};
|
|
|
|
--#{$prefix}progress-bar-transition: #{$progress-bar-transition};
|
|
|
|
// scss-docs-end progress-css-vars
|
|
|
|
|
2020-05-19 16:53:54 +00:00
|
|
|
display: flex;
|
2022-11-04 15:49:41 +00:00
|
|
|
height: var(--#{$prefix}progress-height);
|
2020-05-19 16:53:54 +00:00
|
|
|
overflow: hidden; // force rounded corners by cropping it
|
2022-11-04 15:49:41 +00:00
|
|
|
@include font-size(var(--#{$prefix}progress-font-size));
|
|
|
|
background-color: var(--#{$prefix}progress-bg);
|
|
|
|
@include border-radius(var(--#{$prefix}progress-border-radius));
|
|
|
|
@include box-shadow(var(--#{$prefix}progress-box-shadow));
|
2020-05-19 16:53:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.progress-bar {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
overflow: hidden;
|
2022-11-04 15:49:41 +00:00
|
|
|
color: var(--#{$prefix}progress-bar-color);
|
2020-05-19 16:53:54 +00:00
|
|
|
text-align: center;
|
|
|
|
white-space: nowrap;
|
2022-11-04 15:49:41 +00:00
|
|
|
background-color: var(--#{$prefix}progress-bar-bg);
|
|
|
|
@include transition(var(--#{$prefix}progress-bar-transition));
|
2020-05-19 16:53:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.progress-bar-striped {
|
|
|
|
@include gradient-striped();
|
2022-11-04 15:49:41 +00:00
|
|
|
background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
|
2020-05-19 16:53:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@if $enable-transitions {
|
|
|
|
.progress-bar-animated {
|
2021-03-30 12:34:31 +00:00
|
|
|
animation: $progress-bar-animation-timing progress-bar-stripes;
|
2020-05-19 16:53:54 +00:00
|
|
|
|
2021-07-07 11:12:38 +00:00
|
|
|
@if $enable-reduced-motion {
|
2020-05-19 16:53:54 +00:00
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
animation: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|