Repository navigation
Expand file tree
/
Copy pathloader.less
More file actions
74 lines (59 loc) · 1.55 KB
/
Copy pathloader.less
File metadata and controls
74 lines (59 loc) · 1.55 KB
1
2
3
4
5
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@import "variables";
// Loader
// Shows a spinner with an Octoface
/* Usage: ---------------------------------------------
<div className="github-Loader">
<span className="github-Spinner"></span>
</div>
--------------------------------------------------- */
// Loader (just the container)
.github-Loader {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
color: @gh-background-color-purple;
.tooltip & { color: inherit; }
}
// Spinner (can be used outside of github-Loader too)
.github-Spinner {
position: relative;
display: inline-block;
vertical-align: middle;
width: 2em;
height: 2em;
// Octoface
&::before {
display: inline-block;
width: inherit;
height: inherit;
content: "\f008";
font-family: 'Octicons Regular';
font-weight: normal;
font-style: normal;
line-height: 2;
text-align: center;
-webkit-font-smoothing: antialiased;
}
// spinner
&::after {
content: "";
position: absolute;
width: inherit;
height: inherit;
top: 0;
left: 0;
border-right: 2px dotted;
border-bottom: 2px dotted;
border-left: 2px solid transparent;
border-radius: 1em;
// To limit CPU usage, the animation plays for some time at normal speed,
// then slows down frame-rate for a while and stops at some point
animation: github-Spinner-animation 4s linear 12,
github-Spinner-animation 4s 48s steps(12) 100;
@keyframes github-Spinner-animation {
100% { transform: rotate(360deg); }
}
}
}