1 |
|
2 |
|
3 |
|
4 | @import "../../common/variables";
|
5 | @import "common";
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | $progress-bar-stripes-color: rgba($white, 0.2) !default;
|
31 |
|
32 | $progress-bar-height: round($pt-grid-size * 0.8) !default;
|
33 | $progress-bar-stripes-size: $pt-grid-size * 3 !default;
|
34 | $progress-bar-border-radius: $pt-grid-size * 4 !default;
|
35 |
|
36 | $progress-bar-gradient: linear-gradient(
|
37 | -45deg,
|
38 | $progress-bar-stripes-color 25%,
|
39 | transparent 25%,
|
40 | transparent 50%,
|
41 | $progress-bar-stripes-color 50%,
|
42 | $progress-bar-stripes-color 75%,
|
43 | transparent 75%
|
44 | ) !default;
|
45 |
|
46 | @keyframes linear-progress-bar-stripes {
|
47 | from {
|
48 | background-position: 0 0;
|
49 | }
|
50 |
|
51 | to {
|
52 | background-position: $progress-bar-stripes-size 0;
|
53 | }
|
54 | }
|
55 |
|
56 | .#{$ns}-progress-bar {
|
57 | background: $progress-track-color;
|
58 | border-radius: $progress-bar-border-radius;
|
59 | display: block;
|
60 | height: $progress-bar-height;
|
61 | overflow: hidden;
|
62 | position: relative;
|
63 | width: 100%;
|
64 |
|
65 | .#{$ns}-progress-meter {
|
66 | background: $progress-bar-gradient;
|
67 | background-color: $progress-head-color;
|
68 | background-size: $progress-bar-stripes-size $progress-bar-stripes-size;
|
69 | border-radius: $progress-bar-border-radius;
|
70 | height: 100%;
|
71 | position: absolute;
|
72 | transition: width ($pt-transition-duration * 2) $pt-transition-ease;
|
73 |
|
74 | width: 100%;
|
75 | }
|
76 |
|
77 | &:not(.#{$ns}-no-animation):not(.#{$ns}-no-stripes) .#{$ns}-progress-meter {
|
78 | animation: linear-progress-bar-stripes ($pt-transition-duration * 3) linear infinite reverse;
|
79 | }
|
80 |
|
81 | &.#{$ns}-no-stripes .#{$ns}-progress-meter {
|
82 | background-image: none;
|
83 | }
|
84 | }
|
85 |
|
86 | .#{$ns}-dark .#{$ns}-progress-bar {
|
87 | background: $dark-progress-track-color;
|
88 |
|
89 | .#{$ns}-progress-meter {
|
90 | background-color: $dark-progress-head-color;
|
91 | }
|
92 | }
|
93 |
|
94 | @each $intent, $color in $pt-intent-colors {
|
95 | .#{$ns}-progress-bar.#{$ns}-intent-#{$intent} .#{$ns}-progress-meter {
|
96 | background-color: $color;
|
97 | }
|
98 | }
|