1 | @import 'variables';
|
2 |
|
3 | @import 'default-theme';
|
4 |
|
5 |
|
6 | $md-progress-circle-duration: 5250ms !default;
|
7 | $md-progress-circle-constant-rotate-duration: $md-progress-circle-duration * 0.55 !default;
|
8 | $md-progress-circle-sporadic-rotate-duration: $md-progress-circle-duration !default;
|
9 |
|
10 |
|
11 | $md-progress-circle-stroke-width: 10px !default;
|
12 |
|
13 | $md-progress-circle-viewport-size: 100px !default;
|
14 |
|
15 |
|
16 | :host {
|
17 | display: block;
|
18 | |
19 |
|
20 | height: $md-progress-circle-viewport-size;
|
21 | width: $md-progress-circle-viewport-size;
|
22 |
|
23 | |
24 |
|
25 |
|
26 |
|
27 | svg {
|
28 | height: 100%;
|
29 | width: 100%;
|
30 | transform-origin: center;
|
31 | }
|
32 |
|
33 |
|
34 | path {
|
35 | fill: transparent;
|
36 | stroke: md-color($md-primary, 600);
|
37 |
|
38 | stroke-width: $md-progress-circle-stroke-width;
|
39 | }
|
40 |
|
41 | &[color='accent'] path {
|
42 | stroke: md-color($md-accent, 600);
|
43 | }
|
44 |
|
45 |
|
46 | &[color='warn'] path {
|
47 | stroke: md-color($md-warn, 600);
|
48 | }
|
49 |
|
50 |
|
51 | &[mode='indeterminate'] {
|
52 | animation-duration: $md-progress-circle-sporadic-rotate-duration,
|
53 | $md-progress-circle-constant-rotate-duration;
|
54 | animation-name: md-progress-circle-sporadic-rotate,
|
55 | md-progress-circle-linear-rotate;
|
56 | animation-timing-function: $ease-in-out-curve-function,
|
57 | linear;
|
58 | animation-iteration-count: infinite;
|
59 | transition: none;
|
60 | }
|
61 | }
|
62 |
|
63 |
|
64 |
|
65 | @keyframes md-progress-circle-linear-rotate {
|
66 | 0% { transform: rotate(0deg); }
|
67 | 100% { transform: rotate(360deg); }
|
68 | }
|
69 | @keyframes md-progress-circle-sporadic-rotate {
|
70 | 12.5% { transform: rotate( 135deg); }
|
71 | 25% { transform: rotate( 270deg); }
|
72 | 37.5% { transform: rotate( 405deg); }
|
73 | 50% { transform: rotate( 540deg); }
|
74 | 62.5% { transform: rotate( 675deg); }
|
75 | 75% { transform: rotate( 810deg); }
|
76 | 87.5% { transform: rotate( 945deg); }
|
77 | 100% { transform: rotate(1080deg); }
|
78 | }
|