2019-01-14 19:51:11 -05:00
|
|
|
// Disable animation if transitions are disabled
|
2021-02-10 22:29:59 -05:00
|
|
|
|
|
|
|
// scss-docs-start progress-keyframes
|
2019-01-14 19:51:11 -05:00
|
|
|
@if $enable-transitions {
|
|
|
|
@keyframes progress-bar-stripes {
|
2019-05-02 04:03:28 -04:00
|
|
|
0% { background-position-x: $progress-height; }
|
2019-01-14 19:51:11 -05:00
|
|
|
}
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
2021-02-10 22:29:59 -05:00
|
|
|
// scss-docs-end progress-keyframes
|
2012-01-07 18:52:57 -05:00
|
|
|
|
2011-11-26 13:41:17 -05:00
|
|
|
.progress {
|
2022-03-18 12:02:03 -04: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}; // stylelint-disable-line custom-property-empty-line-before
|
|
|
|
--#{$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
|
|
|
|
|
2016-12-29 17:56:28 -05:00
|
|
|
display: flex;
|
2022-03-18 12:02:03 -04:00
|
|
|
height: var(--#{$prefix}progress-height);
|
2016-11-26 21:46:46 -05:00
|
|
|
overflow: hidden; // force rounded corners by cropping it
|
2022-03-18 12:02:03 -04: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));
|
2015-12-10 17:29:54 -05:00
|
|
|
}
|
2017-01-21 15:32:38 -05:00
|
|
|
|
2016-12-29 17:56:28 -05:00
|
|
|
.progress-bar {
|
2017-05-26 13:48:57 -04:00
|
|
|
display: flex;
|
2017-11-06 12:57:25 -05:00
|
|
|
flex-direction: column;
|
2017-05-26 14:11:10 -04:00
|
|
|
justify-content: center;
|
2019-11-04 07:37:13 -05:00
|
|
|
overflow: hidden;
|
2022-03-18 12:02:03 -04:00
|
|
|
color: var(--#{$prefix}progress-bar-color);
|
2017-11-06 12:57:25 -05:00
|
|
|
text-align: center;
|
2018-02-11 19:46:54 -05:00
|
|
|
white-space: nowrap;
|
2022-03-18 12:02:03 -04:00
|
|
|
background-color: var(--#{$prefix}progress-bar-bg);
|
|
|
|
@include transition(var(--#{$prefix}progress-bar-transition));
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
|
|
|
|
2016-12-29 17:56:28 -05:00
|
|
|
.progress-bar-striped {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include gradient-striped();
|
2022-03-18 12:02:03 -04:00
|
|
|
background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
|
2015-12-10 17:29:54 -05:00
|
|
|
}
|
2012-01-07 18:52:57 -05:00
|
|
|
|
2019-01-14 19:51:11 -05:00
|
|
|
@if $enable-transitions {
|
|
|
|
.progress-bar-animated {
|
2020-11-11 11:27:12 -05:00
|
|
|
animation: $progress-bar-animation-timing progress-bar-stripes;
|
2019-01-14 19:51:11 -05:00
|
|
|
|
2020-04-13 20:48:19 -04:00
|
|
|
@if $enable-reduced-motion {
|
2019-03-21 09:59:02 -04:00
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
animation: none;
|
|
|
|
}
|
2019-01-14 19:51:11 -05:00
|
|
|
}
|
|
|
|
}
|
2012-02-24 05:23:04 -05:00
|
|
|
}
|