Skip to content

Commit 61899e3

Browse files
Zerquix18jgthms
authored andcommitted
Added indeterminate progress bar
1 parent 4d2e608 commit 61899e3

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

docs/documentation/elements/progress.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
<progress class="progress is-large" value="60" max="100">60%</progress>
3535
{% endcapture %}
3636

37+
{% capture progress_indeterminate %}
38+
<progress class="progress is-small is-primary" max="100">15%</progress>
39+
<progress class="progress is-danger" max="100">30%</progress>
40+
<progress class="progress is-medium is-dark" max="100">45%</progress>
41+
<progress class="progress is-large is-info" max="100">60%</progress>
42+
{% endcapture %}
43+
3744
{% include elements/snippet.html content=progress %}
3845

3946
{% include elements/anchor.html name="Colors" %}
@@ -44,4 +51,8 @@
4451

4552
{% include elements/snippet.html content=progress_sizes %}
4653

54+
{% include elements/anchor.html name="Indeterminate" %}
55+
56+
{% include elements/snippet.html content=progress_indeterminate %}
57+
4758
{% include elements/variables.html type='element' %}

sass/elements/progress.sass

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,31 @@ $progress-value-background-color: $text !default
3131
background-color: $color
3232
&::-ms-fill
3333
background-color: $color
34+
35+
&:indeterminate
36+
&::-webkit-progress-bar
37+
background-color: transparent
38+
&::-moz-progress-bar
39+
background-color: transparent
40+
41+
animation: progress-indeterminate 1.5s linear infinite
42+
background: $progress-bar-background-color linear-gradient(to right, $text 30%, $progress-bar-background-color 30%) top left / 150% 150% no-repeat
43+
44+
@each $name, $pair in $colors
45+
$color: nth($pair, 1)
46+
&.is-#{$name}
47+
background: $progress-bar-background-color linear-gradient(to right, $color 30%, $progress-bar-background-color 30%) top left / 150% 150% no-repeat
48+
3449
// Sizes
3550
&.is-small
3651
height: $size-small
3752
&.is-medium
3853
height: $size-medium
3954
&.is-large
4055
height: $size-large
56+
57+
@keyframes progress-indeterminate
58+
0%
59+
background-position: 200% 0
60+
100%
61+
background-position: -200% 0

0 commit comments

Comments
 (0)