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