-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrt.css
More file actions
421 lines (372 loc) · 12.5 KB
/
Copy pathcrt.css
File metadata and controls
421 lines (372 loc) · 12.5 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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
/* ── crt.css ────────────────────────────────────────────────────────────────
The shared medium. Palette, glass and decay, carried verbatim from Keraunos
so the index and every project subdomain are the same instrument. Nothing
page-specific belongs in here, see index.css for that.
Canonical copy: Keraunos/src/crt.css. The others are written by
`node scripts/fanout.cjs` from inside Keraunos; edit this one and fan out. */
/* ── Type ───────────────────────────────────────────────────────────────────
Served from this origin, not from Google. A page whose creed line is about
keeping control of your own data has no business handing every visitor's IP
to a third party for a typeface. The files travel with this stylesheet: copy
`fonts/` alongside it into each project.
Latin and latin-ext only — Plex Mono ships no Greek, so the etymologies fall
to the system mono either way, and `unicode-range` keeps latin-ext off the
wire until something actually needs it. */
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/ibm-plex-mono-600-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'IBM Plex Mono';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/ibm-plex-mono-600-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* ── Dark ───────────────────────────────────────────────────────────────────
Light emitted on black. White is reserved: nothing in the interface reaches
it except the record currently tuned in. */
:root,
:root[data-theme='dark'] {
color-scheme: dark;
--c-void: #0a0a0b;
--c-panel: #0f0f11;
--c-line: #26262b;
--c-land: #4c4c55;
--c-dim: #7b7b81;
--c-text: #c8c8cc;
--c-strike: #ffffff;
--ink-hot: #ffffff;
--ink-rest: #c8c8cc;
--scan: rgba(255, 255, 255, 0.05);
--sweep: rgba(255, 255, 255, 0.028);
--vignette: rgba(0, 0, 0, 0.62);
--bloom: rgba(255, 255, 255, 0.14);
--bloom-hot: rgba(255, 255, 255, 0.3);
/* Its own token, not the sweep's. A broad field needs several times the
alpha of a narrow band to read at all, and the two are tuned by eye on a
real display — turn this down if the glass starts to look dirty rather
than uneven. Held under the sweep now: an unevenness that can be pointed
at has stopped being one, and the tube reads better when the drift is
something you only notice by its absence. */
--drift: rgba(255, 255, 255, 0.024);
}
/* ── Light ──────────────────────────────────────────────────────────────────
The other readout: ink on a chart recorder's roll. A tube cannot be
inverted, so light mode changes medium instead. Black takes over the
reserved role; cool neutral stock, never cream. */
:root[data-theme='light'] {
color-scheme: light;
--c-void: #dedee0;
--c-panel: #e7e7e9;
--c-line: #c2c2c6;
--c-land: #9a9aa2;
--c-dim: #626268;
--c-text: #2a2a2e;
--c-strike: #000000;
--ink-hot: #000000;
--ink-rest: #2a2a2e;
--scan: rgba(0, 0, 0, 0.045);
--sweep: rgba(0, 0, 0, 0.022);
--vignette: rgba(0, 0, 0, 0.14);
/* Ink bleeds into paper fibres rather than glowing. */
--bloom: rgba(0, 0, 0, 0.16);
--bloom-hot: rgba(0, 0, 0, 0.28);
/* Stock is not evenly lit either, but paper shows a shadow sooner than a
tube shows a bloom, so it takes less. */
--drift: rgba(0, 0, 0, 0.018);
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
body {
background: var(--c-void);
color: var(--c-text);
font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
font-size: 12px;
line-height: 18px;
/* Digits must not jitter as readouts tick. */
font-variant-numeric: tabular-nums;
-webkit-font-smoothing: antialiased;
}
:focus-visible {
outline: 1px solid var(--c-text);
outline-offset: 2px;
}
/* ── Phosphor bloom ─────────────────────────────────────────────────────────
Lit pixels bleed into the glass. Reserved for live values, never for
labels: the glow marks what is actually reading. */
.glow {
text-shadow: 0 0 6px var(--bloom);
}
.glow-hot {
text-shadow: 0 0 10px var(--bloom-hot);
}
/* ── The decay rule ─────────────────────────────────────────────────────────
Anything that arrives comes in at full white and settles into the gray of
the interface. */
@keyframes settle {
from {
color: var(--ink-hot);
text-shadow: 0 0 10px var(--bloom-hot);
}
to {
color: var(--ink-rest);
text-shadow: 0 0 6px var(--bloom);
}
}
@keyframes breathe {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.35;
}
}
@keyframes seek {
0%,
100% {
opacity: 0.25;
}
50% {
opacity: 1;
}
}
.settle {
animation: settle 1.4s ease-out;
}
.breathe {
animation: breathe 2.8s ease-in-out infinite;
}
.seek {
animation: seek 1.6s ease-in-out infinite;
}
/* ── The glass ──────────────────────────────────────────────────────────────
Sits above everything, catches no pointer events, and is the only place the
retro treatment lives — the page underneath stays clean. */
.crt {
position: fixed;
inset: 0;
z-index: 50;
overflow: hidden;
pointer-events: none;
}
.crt-scanlines {
position: absolute;
inset: 0;
background-image: repeating-linear-gradient(
to bottom,
var(--scan) 0px,
var(--scan) 1px,
transparent 1px,
transparent 3px
);
}
.crt-vignette {
position: absolute;
inset: 0;
background: radial-gradient(125% 105% at 50% 50%, transparent 52%, var(--vignette) 100%);
}
@keyframes refresh-sweep {
from {
transform: translateY(-14vh);
}
to {
transform: translateY(104vh);
}
}
.crt-sweep {
position: absolute;
inset-inline: 0;
top: 0;
height: 14vh;
background: linear-gradient(to bottom, transparent, var(--sweep), transparent);
animation: refresh-sweep 7.5s linear infinite;
/* It runs forever over the whole viewport. Promised to the compositor so it
moves as a layer instead of repainting the glass beneath it. */
will-change: transform;
}
/* ── Phosphor drift ─────────────────────────────────────────────────────────
A tube does not emit evenly. Two very soft blooms wander the glass on
periods that do not divide into each other, so the brightness across the
page is never flat and never quite repeats — the sweep passing over an
unevenness rather than over a blank.
Transform only. These are full-viewport layers, and animating anything that
repaints would hand the compositor the whole page on every frame; an
animated transform gets a layer of its own and costs nearly nothing. They
sit under the scanlines and the vignette, which is the order the glass is
built in. */
.crt-drift {
position: absolute;
inset: 0;
}
.crt-drift::before,
.crt-drift::after {
content: '';
position: absolute;
/* Wide enough to have no edge on screen, tight enough that the falloff still
changes from one side of the page to the other. Spread it much further and
the gradient per pixel drops under what a display can show, which is a
bloom that is technically there and invisible. */
width: 75vmax;
height: 75vmax;
background: radial-gradient(closest-side, var(--drift), transparent);
animation: drift-a 37s ease-in-out infinite alternate;
}
/* Held off the corners: the vignette is at its heaviest there and would eat
most of what these are for. */
.crt-drift::before {
top: -22vmax;
left: -18vmax;
}
.crt-drift::after {
bottom: -22vmax;
right: -18vmax;
animation-name: drift-b;
animation-duration: 53s;
}
/* The three pieces of glass a reader can take off, all of them from the same
kind of attribute on the root: the medium owns what they look like, and this
only says whether the tube is wearing them. The drift is the faintest of the
three and the most expensive to composite, so it is the first one worth
removing on a machine that is struggling. */
:root[data-scanlines='off'] .crt-scanlines,
:root[data-sweep='off'] .crt-sweep,
:root[data-drift='off'] .crt-drift {
display: none;
}
/* Two vectors rather than one run backwards: parallel blooms read as a single
layer sliding, crossing ones read as the tube being uneven. */
@keyframes drift-a {
from {
transform: translate3d(0, 0, 0);
}
to {
transform: translate3d(26vmax, 16vmax, 0);
}
}
@keyframes drift-b {
from {
transform: translate3d(0, 0, 0);
}
to {
transform: translate3d(-21vmax, 13vmax, 0);
}
}
/* ── HUD frame ──────────────────────────────────────────────────────────────
Corner ticks instead of full borders: the frame reads as an instrument
bezel and leaves the edges open. */
.tick {
position: absolute;
width: 9px;
height: 9px;
border-color: var(--c-land);
border-style: solid;
border-width: 0;
pointer-events: none;
}
.tick.tl {
top: 0;
left: 0;
border-top-width: 1px;
border-left-width: 1px;
}
.tick.tr {
top: 0;
right: 0;
border-top-width: 1px;
border-right-width: 1px;
}
.tick.bl {
bottom: 0;
left: 0;
border-bottom-width: 1px;
border-left-width: 1px;
}
.tick.br {
bottom: 0;
right: 0;
border-bottom-width: 1px;
border-right-width: 1px;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background-color: var(--c-line);
}
::-webkit-scrollbar-thumb:hover {
background-color: var(--c-land);
}
@media (prefers-reduced-motion: reduce) {
.settle,
.breathe,
.seek,
.crt-sweep,
.crt-drift::before,
.crt-drift::after {
animation: none;
}
}