forked from Distal-Labs/elk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.css
234 lines (205 loc) · 3.96 KB
/
global.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
html {
font-size: var(--font-size, 15px);
width: 100%;
width: 100vw;
}
@font-face {
font-display: swap;
font-family: 'Homemade Apple';
font-style: normal;
font-weight: 400;
src: url(/fonts/homemade-apple-v18.ttf) format('truetype');
}
::-moz-selection {
background: var(--c-bg-selection);
}
::selection {
background: var(--c-bg-selection);
}
/* Force vertical scrollbar to be always visible to avoid layout shift while loading the content */
body {
overflow-y: scroll;
-webkit-tap-highlight-color: transparent;
}
.zen .zen-hide {
--at-apply: 'op0 hover:op100 transition duration-600';
}
.zen .zen-none {
display: none;
}
.content-editor img.custom-emoji,
.custom-emoji img,
.iconify-emoji {
display: inline-block;
height: 1.2em;
width: 1.2em;
margin-right: 0.075em;
margin-left: 0.075em;
object-fit: contain;
overflow: hidden;
vertical-align: -20%;
}
.iconify-emoji-padded {
transform: scale(1.2);
}
em-emoji-picker {
--border-radius: 0;
width: 352px;
}
.content-rich {
overflow-wrap: break-word;
a {
--at-apply: 'text-primary hover:underline hover:text-primary-active';
.invisible {
--at-apply: 'hidden';
}
.ellipsis {
--at-apply: 'line-clamp-1 ws-pre-wrap break-all inline';
&::after {
content: '…';
}
}
}
b,
strong {
--at-apply: font-bold;
}
p {
--at-apply: my-2;
}
p:first-child {
--at-apply: mt-1;
}
p:last-child {
--at-apply: mb-1;
}
code {
--at-apply: bg-code text-code px1 py0.5 rounded text-0.875em leading-0.8em;
}
pre code {
--at-apply: bg-transparent px0 py0 rounded-none leading-1.6em;
}
ol {
--at-apply: list-decimal my-3 pl-6 ml-2;
}
ul {
--at-apply: list-disc my-3 pl-6 ml-2;
}
li {
--at-apply: mt-1 mb-1;
&:empty {
--at-apply: hidden;
}
}
ol > li {
--at-apply: pl-2;
}
ul > li {
--at-apply: pl-2;
}
.code-block {
--at-apply: bg-code text-0.875em p3 mt-2 rounded overflow-auto
leading-1.6em;
.shiki {
background: transparent !important;
}
}
}
.line-compact {
line-height: calc(4 / 3 * 1em);
}
.content-editor {
--at-apply: outline-none flex-1;
max-width: 100%;
.custom-emoji {
margin: 0 0.2em;
}
p {
--at-apply: my-0;
line-height: calc(4 / 3 * 1em);
}
p:first-child {
--at-apply: mt-1;
}
p:last-child {
--at-apply: mb-1;
}
}
.skeleton-loading-bg {
background: linear-gradient(
90deg,
rgba(190, 190, 190, 0.2) 25%,
rgba(129, 129, 129, 0.24) 37%,
rgba(190, 190, 190, 0.2) 63%
);
background-size: 400% 100%;
animation: skeleton-loading 1.4s ease infinite;
}
@keyframes skeleton-loading {
0% {
background-position: 100% 50%;
}
to {
background-position: 0 50%;
}
}
html,
body,
#__nuxt {
height: 100vh;
margin: 0;
padding: 0;
}
html.dark {
color-scheme: dark;
}
html {
--at-apply: bg-base text-base;
}
html:not(.enable-pinch-to-zoom) body {
/* Prevent arbitrary zooming on mobile devices */
touch-action: pan-x pan-y;
}
.sparkline--fill {
fill: var(--c-primary-active);
opacity: 0.2;
}
.sparkline--line {
stroke: var(--c-primary);
stroke-width: 2;
}
html[dir="rtl"] .rtl-flip {
transform: scale(-1, 1)
}
footer {
a {
--at-apply: 'hover:underline';
}
}
.squircle {
clip-path: url(#avatar-mask);
}
/*
Grayscale mode
Setting each element filter to a different var
allows controlling them individually
*/
[data-mode="grayscale"] img,
[data-mode="grayscale"] video {
filter: grayscale(var(--media-grayscale, 1));
transition: filter .23s ease-in-out .2s;
}
[data-mode="grayscale"] pre {
filter: grayscale(var(--code-grayscale, 1));
}
[data-mode="grayscale"] .poll-wrapper {
filter: grayscale(var(--poll-grayscale, 1));
}
[data-mode="grayscale"] .status-actions,
[data-mode="grayscale"] .status-boosted {
filter: grayscale(var(--status-grayscale, 1));
}
[data-mode="grayscale"] img:hover,
[data-mode="grayscale"] video:hover {
filter: grayscale(0);
}