forked from cBioPortal/cbioportal-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixins.scss
83 lines (73 loc) · 2.36 KB
/
mixins.scss
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
75
76
77
78
79
80
81
82
83
@import './variables.scss';
@mixin dashed-border-section {
padding: 10px;
border-radius: $cornerBorderRadius;
border: 1px dashed $borderColor;
}
@mixin scrollbar-always-visible {
// force scrollbar visible
// source: https://gist.github.com/devinrhode2/2573411#gistcomment-2243001
&::-webkit-scrollbar {
width: 8px;
height: 8px;
background-color: rgba(0, 0, 0, 0);
-webkit-border-radius: 100px;
}
&::-webkit-scrollbar:hover {
//background-color: rgba(0, 0, 0, 0.09);
}
&::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.21);
-webkit-border-radius: 100px;
width: 8px;
height: 8px;
}
&::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.3);
}
&::-webkit-scrollbar-thumb:active {
background: rgba(0, 0, 0, 0.42);
-webkit-border-radius: 100px;
}
}
@mixin marching-ants-v2-init($ant-size, $ant-width, $speed, $id) {
background-size: $ant-size $ant-width, $ant-size $ant-width,
$ant-width $ant-size, $ant-width $ant-size !important;
background-position: 0 0, 0 100%, 0 0, 100% 0;
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y !important;
animation: marching-ants-#{$id} $speed;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-play-state: running;
&:hover,
&.marching {
animation-play-state: running;
}
&.reverse {
animation-direction: reverse;
}
}
@mixin marching-ants-v2-color($a, $b) {
background-image: linear-gradient(to right, $a 50%, $b 50%),
linear-gradient(to right, $a 50%, $b 50%),
linear-gradient(to bottom, $a 50%, $b 50%),
linear-gradient(to bottom, $a 50%, $b 50%) !important;
}
@mixin marching-ants-v2-animation($ant-size, $id) {
@keyframes marching-ants-#{$id} {
0% {
background-position: 0 0, 0 100%, 0 0, 100% 0;
}
100% {
background-position: 2 * $ant-size 0, -2 * $ant-size 100%,
0 -2 * $ant-size, 100% 2 * $ant-size;
}
}
}
@mixin marching-ants() {
@include marching-ants-v2-init(20px, 1px, 2s, 1);
@include marching-ants-v2-color(#eee, #333);
}
@include marching-ants-v2-animation(20px, 1);
@include marching-ants-v2-animation(20px, 2);
@include marching-ants-v2-animation(20px, 3);