2020-10-31 23:52:27 +00:00
|
|
|
@import "../utilities/mixins"
|
|
|
|
|
|
2019-09-19 18:08:42 +01:00
|
|
|
$progress-bar-background-color: $border-light !default
|
2017-07-28 21:05:15 +01:00
|
|
|
$progress-value-background-color: $text !default
|
2019-05-17 12:52:34 +02:00
|
|
|
$progress-border-radius: $radius-rounded !default
|
2017-07-28 21:05:15 +01:00
|
|
|
|
2018-10-28 14:45:28 +00:00
|
|
|
$progress-indeterminate-duration: 1.5s !default
|
|
|
|
|
|
2020-08-21 11:40:07 -04:00
|
|
|
$progress-colors: $colors !default
|
|
|
|
|
|
2016-03-26 16:46:15 +00:00
|
|
|
.progress
|
2018-09-04 15:24:50 +02:00
|
|
|
@extend %block
|
2016-03-26 16:46:15 +00:00
|
|
|
-moz-appearance: none
|
|
|
|
|
-webkit-appearance: none
|
|
|
|
|
border: none
|
2019-05-17 12:52:34 +02:00
|
|
|
border-radius: $progress-border-radius
|
2016-03-26 16:46:15 +00:00
|
|
|
display: block
|
2016-10-30 10:41:53 +00:00
|
|
|
height: $size-normal
|
2016-03-26 16:46:15 +00:00
|
|
|
overflow: hidden
|
|
|
|
|
padding: 0
|
|
|
|
|
width: 100%
|
|
|
|
|
&::-webkit-progress-bar
|
2017-07-28 21:05:15 +01:00
|
|
|
background-color: $progress-bar-background-color
|
2016-03-26 17:12:13 +00:00
|
|
|
&::-webkit-progress-value
|
2017-07-28 21:05:15 +01:00
|
|
|
background-color: $progress-value-background-color
|
2016-03-26 16:46:15 +00:00
|
|
|
&::-moz-progress-bar
|
2017-07-28 21:05:15 +01:00
|
|
|
background-color: $progress-value-background-color
|
2017-10-18 23:43:57 -07:00
|
|
|
&::-ms-fill
|
|
|
|
|
background-color: $progress-value-background-color
|
2017-10-22 08:51:18 -07:00
|
|
|
border: none
|
2018-12-07 18:07:49 -03:00
|
|
|
// Colors
|
2020-08-21 11:40:07 -04:00
|
|
|
@each $name, $pair in $progress-colors
|
2018-12-07 18:07:49 -03:00
|
|
|
$color: nth($pair, 1)
|
|
|
|
|
&.is-#{$name}
|
|
|
|
|
&::-webkit-progress-value
|
|
|
|
|
background-color: $color
|
|
|
|
|
&::-moz-progress-bar
|
|
|
|
|
background-color: $color
|
|
|
|
|
&::-ms-fill
|
|
|
|
|
background-color: $color
|
|
|
|
|
&:indeterminate
|
|
|
|
|
background-image: linear-gradient(to right, $color 30%, $progress-bar-background-color 30%)
|
|
|
|
|
|
2018-10-28 14:45:28 +00:00
|
|
|
&: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
|
2019-06-21 15:15:52 -04:00
|
|
|
&::-ms-fill
|
|
|
|
|
animation-name: none
|
2018-10-07 21:32:48 -04:00
|
|
|
|
2016-04-10 16:00:32 +01:00
|
|
|
// Sizes
|
|
|
|
|
&.is-small
|
2016-10-30 10:41:53 +00:00
|
|
|
height: $size-small
|
2016-04-10 16:00:32 +01:00
|
|
|
&.is-medium
|
2016-10-30 10:41:53 +00:00
|
|
|
height: $size-medium
|
2016-04-10 16:00:32 +01:00
|
|
|
&.is-large
|
2016-10-30 10:41:53 +00:00
|
|
|
height: $size-large
|
2018-10-07 21:32:48 -04:00
|
|
|
|
2018-10-28 14:45:28 +00:00
|
|
|
@keyframes moveIndeterminate
|
|
|
|
|
from
|
2018-10-07 21:32:48 -04:00
|
|
|
background-position: 200% 0
|
2018-10-28 14:45:28 +00:00
|
|
|
to
|
2018-10-07 21:32:48 -04:00
|
|
|
background-position: -200% 0
|