Files
bulma/sass/elements/progress.sass
2018-10-28 12:02:19 +00:00

62 lines
1.7 KiB
Sass

$progress-bar-background-color: $border !default
$progress-value-background-color: $text !default
.progress
@extend %block
-moz-appearance: none
-webkit-appearance: none
border: none
border-radius: $radius-rounded
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
@each $name, $pair in $colors
$color: nth($pair, 1)
&.is-#{$name}
&::-webkit-progress-value
background-color: $color
&::-moz-progress-bar
background-color: $color
&::-ms-fill
background-color: $color
&:indeterminate
&::-webkit-progress-bar
background-color: transparent
&::-moz-progress-bar
background-color: transparent
animation: progress-indeterminate 1.5s linear infinite
background: $progress-bar-background-color linear-gradient(to right, $text 30%, $progress-bar-background-color 30%) top left / 150% 150% no-repeat
@each $name, $pair in $colors
$color: nth($pair, 1)
&.is-#{$name}
background: $progress-bar-background-color linear-gradient(to right, $color 30%, $progress-bar-background-color 30%) top left / 150% 150% no-repeat
// Sizes
&.is-small
height: $size-small
&.is-medium
height: $size-medium
&.is-large
height: $size-large
@keyframes progress-indeterminate
0%
background-position: 200% 0
100%
background-position: -200% 0