[d565449] | 1 | // Disable animation if transitions are disabled
|
---|
| 2 |
|
---|
| 3 | // scss-docs-start progress-keyframes
|
---|
| 4 | @if $enable-transitions {
|
---|
| 5 | @keyframes progress-bar-stripes {
|
---|
| 6 | 0% { background-position-x: $progress-height; }
|
---|
| 7 | }
|
---|
| 8 | }
|
---|
| 9 | // scss-docs-end progress-keyframes
|
---|
| 10 |
|
---|
| 11 | .progress,
|
---|
| 12 | .progress-stacked {
|
---|
| 13 | // scss-docs-start progress-css-vars
|
---|
| 14 | --#{$prefix}progress-height: #{$progress-height};
|
---|
| 15 | @include rfs($progress-font-size, --#{$prefix}progress-font-size);
|
---|
| 16 | --#{$prefix}progress-bg: #{$progress-bg};
|
---|
| 17 | --#{$prefix}progress-border-radius: #{$progress-border-radius};
|
---|
| 18 | --#{$prefix}progress-box-shadow: #{$progress-box-shadow};
|
---|
| 19 | --#{$prefix}progress-bar-color: #{$progress-bar-color};
|
---|
| 20 | --#{$prefix}progress-bar-bg: #{$progress-bar-bg};
|
---|
| 21 | --#{$prefix}progress-bar-transition: #{$progress-bar-transition};
|
---|
| 22 | // scss-docs-end progress-css-vars
|
---|
| 23 |
|
---|
| 24 | display: flex;
|
---|
| 25 | height: var(--#{$prefix}progress-height);
|
---|
| 26 | overflow: hidden; // force rounded corners by cropping it
|
---|
| 27 | @include font-size(var(--#{$prefix}progress-font-size));
|
---|
| 28 | background-color: var(--#{$prefix}progress-bg);
|
---|
| 29 | @include border-radius(var(--#{$prefix}progress-border-radius));
|
---|
| 30 | @include box-shadow(var(--#{$prefix}progress-box-shadow));
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | .progress-bar {
|
---|
| 34 | display: flex;
|
---|
| 35 | flex-direction: column;
|
---|
| 36 | justify-content: center;
|
---|
| 37 | overflow: hidden;
|
---|
| 38 | color: var(--#{$prefix}progress-bar-color);
|
---|
| 39 | text-align: center;
|
---|
| 40 | white-space: nowrap;
|
---|
| 41 | background-color: var(--#{$prefix}progress-bar-bg);
|
---|
| 42 | @include transition(var(--#{$prefix}progress-bar-transition));
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | .progress-bar-striped {
|
---|
| 46 | @include gradient-striped();
|
---|
| 47 | background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | .progress-stacked > .progress {
|
---|
| 51 | overflow: visible;
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | .progress-stacked > .progress > .progress-bar {
|
---|
| 55 | width: 100%;
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | @if $enable-transitions {
|
---|
| 59 | .progress-bar-animated {
|
---|
| 60 | animation: $progress-bar-animation-timing progress-bar-stripes;
|
---|
| 61 |
|
---|
| 62 | @if $enable-reduced-motion {
|
---|
| 63 | @media (prefers-reduced-motion: reduce) {
|
---|
| 64 | animation: none;
|
---|
| 65 | }
|
---|
| 66 | }
|
---|
| 67 | }
|
---|
| 68 | }
|
---|