-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreading-mode.css
90 lines (70 loc) · 1.33 KB
/
reading-mode.css
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
84
85
86
87
88
89
:root {
--color: 255, 71, 84;
--cursor-size: 36px;
}
* {
cursor: pointer;
}
.new-cursor {
position: absolute;
z-index: 99;
top: 0;
left: 0;
width: var(--cursor-size);
height: var(--cursor-size);
border: calc(var(--cursor-size)
/30) solid #fff;
border-radius: 50%;
animation: cursor 800ms infinite
alternate ease-in-out;
pointer-events: none;
}
.new-cursor::before {
content: "";
display: block;
width: calc(var(--cursor-size) / 2);
height: calc(var(--cursor-size) / 2);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: calc(var(--cursor-size) / 6)
dotted rgba(var(--color), 0.3);
border-radius: 50%;
animation: cursor-before 800ms infinite
alternate cubic-bezier(0.19, 1, 0.22, 1);
}
.new-cursor.click {
animation: cursor-click 800ms
normal ease-in-out;
}
@keyframes cursor {
from {
transform: scale(1);
border-color: #fff;
}
to {
transform: scale(1.5);
border-color: rgb(var(--color));
}
}
@keyframes cursor-before {
from {
transform: translate(-50%, -50%) scale(1);
border-color: rgba(var(--color), 0.25);
}
to {
transform: translate(-50%, -50%) scale(1.5);
border-color: rgba(var(--color), 0.5);
}
}
@keyframes cursor-click {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(2.5);
border-color: rgb(var(--color));
}
}