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