2021-02-15 07:50:28 +00:00
|
|
|
@import "../utilities/mixins"
|
|
|
|
|
|
|
|
$progress-bar-background-color: $border-light !default
|
2018-01-29 09:42:34 +00:00
|
|
|
$progress-value-background-color: $text !default
|
2021-02-15 07:50:28 +00:00
|
|
|
$progress-border-radius: $radius-rounded !default
|
|
|
|
|
|
|
|
$progress-indeterminate-duration: 1.5s !default
|
|
|
|
|
|
|
|
$progress-colors: $colors !default
|
2018-01-29 09:42:34 +00:00
|
|
|
|
|
|
|
.progress
|
2021-02-15 07:50:28 +00:00
|
|
|
@extend %block
|
2018-01-29 09:42:34 +00:00
|
|
|
-moz-appearance: none
|
|
|
|
-webkit-appearance: none
|
|
|
|
border: none
|
2021-02-15 07:50:28 +00:00
|
|
|
border-radius: $progress-border-radius
|
2018-01-29 09:42:34 +00:00
|
|
|
display: block
|
|
|
|
height: $size-normal
|
|
|
|
overflow: hidden
|
|
|
|
padding: 0
|
|
|
|
width: 100%
|
|
|
|
&::-webkit-progress-bar
|
|
|
|
background-color: $progress-bar-background-color
|
|
|
|
&::-webkit-progress-value
|
|
|
|
background-color: $progress-value-background-color
|
|
|
|
&::-moz-progress-bar
|
|
|
|
background-color: $progress-value-background-color
|
|
|
|
&::-ms-fill
|
|
|
|
background-color: $progress-value-background-color
|
|
|
|
border: none
|
|
|
|
// Colors
|
2021-02-15 07:50:28 +00:00
|
|
|
@each $name, $pair in $progress-colors
|
2018-01-29 09:42:34 +00:00
|
|
|
$color: nth($pair, 1)
|
|
|
|
&.is-#{$name}
|
|
|
|
&::-webkit-progress-value
|
|
|
|
background-color: $color
|
|
|
|
&::-moz-progress-bar
|
|
|
|
background-color: $color
|
|
|
|
&::-ms-fill
|
|
|
|
background-color: $color
|
2021-02-15 07:50:28 +00:00
|
|
|
&:indeterminate
|
|
|
|
background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color 30%)
|
|
|
|
|
|
|
|
&:indeterminate
|
|
|
|
animation-duration: $progress-indeterminate-duration
|
|
|
|
animation-iteration-count: infinite
|
|
|
|
animation-name: moveIndeterminate
|
|
|
|
animation-timing-function: linear
|
|
|
|
background-color: $progress-bar-background-color
|
|
|
|
background-image: linear-gradient(to right, $text 30%, $progress-bar-background-color 30%)
|
|
|
|
background-position: top left
|
|
|
|
background-repeat: no-repeat
|
|
|
|
background-size: 150% 150%
|
|
|
|
&::-webkit-progress-bar
|
|
|
|
background-color: transparent
|
|
|
|
&::-moz-progress-bar
|
|
|
|
background-color: transparent
|
|
|
|
&::-ms-fill
|
|
|
|
animation-name: none
|
|
|
|
|
2018-01-29 09:42:34 +00:00
|
|
|
// Sizes
|
|
|
|
&.is-small
|
|
|
|
height: $size-small
|
|
|
|
&.is-medium
|
|
|
|
height: $size-medium
|
|
|
|
&.is-large
|
|
|
|
height: $size-large
|
2021-02-15 07:50:28 +00:00
|
|
|
|
|
|
|
@keyframes moveIndeterminate
|
|
|
|
from
|
|
|
|
background-position: 200% 0
|
|
|
|
to
|
|
|
|
background-position: -200% 0
|