[f5f7c24] | 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 | // scss-docs-start progress-css-vars
|
---|
| 13 | --#{$prefix}progress-height: #{$progress-height};
|
---|
| 14 | @include rfs($progress-font-size, --#{$prefix}progress-font-size);
|
---|
| 15 | --#{$prefix}progress-bg: #{$progress-bg};
|
---|
| 16 | --#{$prefix}progress-border-radius: #{$progress-border-radius};
|
---|
| 17 | --#{$prefix}progress-box-shadow: #{$progress-box-shadow};
|
---|
| 18 | --#{$prefix}progress-bar-color: #{$progress-bar-color};
|
---|
| 19 | --#{$prefix}progress-bar-bg: #{$progress-bar-bg};
|
---|
| 20 | --#{$prefix}progress-bar-transition: #{$progress-bar-transition};
|
---|
| 21 | // scss-docs-end progress-css-vars
|
---|
| 22 |
|
---|
| 23 | display: flex;
|
---|
| 24 | height: var(--#{$prefix}progress-height);
|
---|
| 25 | overflow: hidden; // force rounded corners by cropping it
|
---|
| 26 | @include font-size(var(--#{$prefix}progress-font-size));
|
---|
| 27 | background-color: var(--#{$prefix}progress-bg);
|
---|
| 28 | @include border-radius(var(--#{$prefix}progress-border-radius));
|
---|
| 29 | @include box-shadow(var(--#{$prefix}progress-box-shadow));
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | .progress-bar {
|
---|
| 33 | display: flex;
|
---|
| 34 | flex-direction: column;
|
---|
| 35 | justify-content: center;
|
---|
| 36 | overflow: hidden;
|
---|
| 37 | color: var(--#{$prefix}progress-bar-color);
|
---|
| 38 | text-align: center;
|
---|
| 39 | white-space: nowrap;
|
---|
| 40 | background-color: var(--#{$prefix}progress-bar-bg);
|
---|
| 41 | @include transition(var(--#{$prefix}progress-bar-transition));
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | .progress-bar-striped {
|
---|
| 45 | @include gradient-striped();
|
---|
| 46 | background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | @if $enable-transitions {
|
---|
| 50 | .progress-bar-animated {
|
---|
| 51 | animation: $progress-bar-animation-timing progress-bar-stripes;
|
---|
| 52 |
|
---|
| 53 | @if $enable-reduced-motion {
|
---|
| 54 | @media (prefers-reduced-motion: reduce) {
|
---|
| 55 | animation: none;
|
---|
| 56 | }
|
---|
| 57 | }
|
---|
| 58 | }
|
---|
| 59 | }
|
---|