-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathneko.css
164 lines (153 loc) · 3.74 KB
/
neko.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/* Neko */
/* Future-proofed version inspired by refact0r (508863359777505290) */
/*
PUT THIS :root SNIPPET INTO YOUR QUICKCSS TO CUSTOMISE:
typing animation: alert, scratchdown, runleft, runright, wallscratch
:root {
--typing-animation: scratchdown;
}
*/
@import "https://raw.githubusercontent.com/XaaRii/discord-themes/master/april-fools.css";
[class^="channelTextArea"]::before {
/* duration of wakeup and go to sleep animations (in seconds) */
/* set to 2.65s to match windows cursor blink rate */
--wakeup-duration: 2.65s;
/* duration of sleeping and typing animations */
--sleep-duration: calc(var(--wakeup-duration));
--typing-duration: calc(var(--wakeup-duration) / 5);
/* typing animation: runright, runleft, alert, wallscratch, scratchdown */
--typing-animation: scratchdown;
content: "";
width: 32px;
height: 32px;
bottom: calc(100% - 3px);
/* Mess with the - 3px to change its vertical position */
right: calc(var(--custom-index-scrollbar-margin) * 2 + var(--custom-index-scrollbar-width));
/* Switch this from right to left to put it on the left side, or increase/decrease to change its position */
margin-left: auto;
margin-top: auto;
position: absolute;
image-rendering: pixelated;
background-image: url("https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif");
animation: sleep var(--sleep-duration) infinite;
/* change 1s to make the animation slower/faster */
}
[class^="channelTextArea"]:hover::before {
animation: var(--wakeup-duration) 1 forwards wakeup;
}
[class^="channelTextArea"]:not(:hover)::before {
animation: var(--sleep-duration) 1 forwards gotosleep,
var(--sleep-duration) var(--wakeup-duration) infinite sleep;
}
[class^="channelTextArea"]:has([class*="editor"]:focus)::before {
animation: var(--wakeup-duration) 1 forwards wakeup,
var(--typing-duration) var(--wakeup-duration) infinite var(--typing-animation);
}
@keyframes sleep {
/*
if you open the background image in ur browser, you will see that it has way more frames
so if you want, you could make ur own keyframes for a different animation
the top left frame is 0 0, second top row is -32 0, second row second is -32 -32 and so on
the ...00001% makes it so that there's no transition between the frames, so if you wanted say 3 frames, you'd do 0%, 33.3%; 33.30001%, 66.6%; 66.60001%, 100%
*/
0%,
50% {
background-position: -64px 0;
}
50.00001%,
100% {
background-position: -64px -32px;
}
}
@keyframes alert {
0%,
50% {
background-position: -224px -96px;
}
50.00001%,
100% {
background-position: -96px -96px;
}
}
@keyframes runright {
0%,
50% {
background-position: -96px 2px;
}
50.00001%,
100% {
background-position: -96px -30px;
}
}
@keyframes runleft {
0%,
50% {
background-position: -128px -62px;
}
50.00001%,
100% {
background-position: -128px -94px;
}
}
@keyframes wallscratch {
0%,
50% {
background-position: -64px -62px;
}
50.00001%,
100% {
background-position: -64px -94px;
}
}
@keyframes wakeup {
0%,
5% {
background-position: -160px 0;
}
5.00001%,
10% {
background-position: -192px 0;
}
10.00001%,
15% {
background-position: -160px 0;
}
15.00001%,
20% {
background-position: -192px 0;
}
20.00001%,
35% {
background-position: -224px 0;
}
35.00001%,
60% {
background-position: -96px -64px;
}
60.00001%,
100% {
background-position: -96px -96px;
}
}
@keyframes gotosleep {
0%,
80% {
background-position: -96px -64px;
}
80.00001%,
100% {
background-position: -64px 0;
}
}
@keyframes scratchdown {
0%,
50% {
background-position: -224px -30px;
bottom: calc(100% - 13px);
}
50.00001%,
100% {
background-position: -192px -62px;
bottom: calc(100% - 13px);
}
}