| 1 |
@import "../utilities/mixins" |
| 2 |
|
| 3 |
$progress-bar-background-color: $border-light !default |
| 4 |
$progress-value-background-color: $text !default |
| 5 |
$progress-border-radius: $radius-rounded !default |
| 6 |
|
| 7 |
$progress-indeterminate-duration: 1.5s !default |
| 8 |
|
| 9 |
$progress-colors: $colors !default |
| 10 |
|
| 11 |
.progress |
| 12 |
@extend %block |
| 13 |
-moz-appearance: none |
| 14 |
-webkit-appearance: none |
| 15 |
border: none |
| 16 |
border-radius: $progress-border-radius |
| 17 |
display: block |
| 18 |
height: $size-normal |
| 19 |
overflow: hidden |
| 20 |
padding: 0 |
| 21 |
width: 100% |
| 22 |
&::-webkit-progress-bar |
| 23 |
background-color: $progress-bar-background-color |
| 24 |
&::-webkit-progress-value |
| 25 |
background-color: $progress-value-background-color |
| 26 |
&::-moz-progress-bar |
| 27 |
background-color: $progress-value-background-color |
| 28 |
&::-ms-fill |
| 29 |
background-color: $progress-value-background-color |
| 30 |
border: none |
| 31 |
// Colors |
| 32 |
@each $name, $pair in $progress-colors |
| 33 |
$color: nth($pair, 1) |
| 34 |
&.is-#{$name} |
| 35 |
&::-webkit-progress-value |
| 36 |
background-color: $color |
| 37 |
&::-moz-progress-bar |
| 38 |
background-color: $color |
| 39 |
&::-ms-fill |
| 40 |
background-color: $color |
| 41 |
&:indeterminate |
| 42 |
background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color 30%) |
| 43 |
|
| 44 |
&:indeterminate |
| 45 |
animation-duration: $progress-indeterminate-duration |
| 46 |
animation-iteration-count: infinite |
| 47 |
animation-name: moveIndeterminate |
| 48 |
animation-timing-function: linear |
| 49 |
background-color: $progress-bar-background-color |
| 50 |
background-image: linear-gradient(to right, $text 30%, $progress-bar-background-color 30%) |
| 51 |
background-position: top left |
| 52 |
background-repeat: no-repeat |
| 53 |
background-size: 150% 150% |
| 54 |
&::-webkit-progress-bar |
| 55 |
background-color: transparent |
| 56 |
&::-moz-progress-bar |
| 57 |
background-color: transparent |
| 58 |
&::-ms-fill |
| 59 |
animation-name: none |
| 60 |
|
| 61 |
// Sizes |
| 62 |
&.is-small |
| 63 |
height: $size-small |
| 64 |
&.is-medium |
| 65 |
height: $size-medium |
| 66 |
&.is-large |
| 67 |
height: $size-large |
| 68 |
|
| 69 |
@keyframes moveIndeterminate |
| 70 |
from |
| 71 |
background-position: 200% 0 |
| 72 |
to |
| 73 |
background-position: -200% 0 |