codecheck
128 строк · 2.6 Кб
1// core
2.p-progressbar {
3position: relative;
4overflow: hidden;
5}
6
7.p-progressbar-determinate .p-progressbar-value {
8height: 100%;
9width: 0%;
10position: absolute;
11display: none;
12border: 0 none;
13display: flex;
14align-items: center;
15justify-content: center;
16overflow: hidden;
17}
18
19.p-progressbar-determinate .p-progressbar-label {
20display: inline-flex;
21}
22
23.p-progressbar-determinate .p-progressbar-value-animate {
24transition: width 1s ease-in-out;
25}
26
27.p-progressbar-indeterminate .p-progressbar-value::before {
28content: '';
29position: absolute;
30background-color: inherit;
31top: 0;
32left: 0;
33bottom: 0;
34will-change: left, right;
35-webkit-animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
36animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
37}
38
39.p-progressbar-indeterminate .p-progressbar-value::after {
40content: '';
41position: absolute;
42background-color: inherit;
43top: 0;
44left: 0;
45bottom: 0;
46will-change: left, right;
47-webkit-animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
48animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
49-webkit-animation-delay: 1.15s;
50animation-delay: 1.15s;
51}
52
53@-webkit-keyframes p-progressbar-indeterminate-anim {
540% {
55left: -35%;
56right: 100%;
57}
5860% {
59left: 100%;
60right: -90%;
61}
62100% {
63left: 100%;
64right: -90%;
65}
66}
67@keyframes p-progressbar-indeterminate-anim {
680% {
69left: -35%;
70right: 100%;
71}
7260% {
73left: 100%;
74right: -90%;
75}
76100% {
77left: 100%;
78right: -90%;
79}
80}
81
82@-webkit-keyframes p-progressbar-indeterminate-anim-short {
830% {
84left: -200%;
85right: 100%;
86}
8760% {
88left: 107%;
89right: -8%;
90}
91100% {
92left: 107%;
93right: -8%;
94}
95}
96@keyframes p-progressbar-indeterminate-anim-short {
970% {
98left: -200%;
99right: 100%;
100}
10160% {
102left: 107%;
103right: -8%;
104}
105100% {
106left: 107%;
107right: -8%;
108}
109}
110
111// theme
112.p-progressbar {
113border: $progressBarBorder;
114height: $progressBarHeight;
115background: $progressBarBg;
116border-radius: $borderRadius;
117
118.p-progressbar-value {
119border: 0 none;
120margin: 0;
121background: $progressBarValueBg;
122}
123
124.p-progressbar-label {
125color: $progressBarValueTextColor;
126line-height: $progressBarHeight;
127}
128}
129