-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathsite.css
More file actions
502 lines (429 loc) · 8.67 KB
/
Copy pathsite.css
File metadata and controls
502 lines (429 loc) · 8.67 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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
:root {
--canvas: #ffffff;
--ink: #000000;
--ink-2: rgb(0 0 0 / 64%);
--ink-3: rgb(0 0 0 / 44%);
--line: rgb(0 0 0 / 10%);
--line-strong: rgb(0 0 0 / 18%);
--hover: rgb(0 0 0 / 5%);
--pressed: rgb(0 0 0 / 9%);
--fill: rgb(0 0 0 / 4%);
--radius: 8px;
--nav-height: 0px;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
background: var(--canvas);
color: var(--ink);
font-family: Inter, "Inter Variable", ui-sans-serif, system-ui, sans-serif;
font-size: 16px;
font-weight: 400;
line-height: 1.55;
}
h1,
h2 {
font-weight: 600;
letter-spacing: -0.02em;
line-height: 1.1;
margin: 0;
}
a {
color: inherit;
}
button {
font: inherit;
color: inherit;
background: none;
border: 0;
padding: 0;
cursor: pointer;
}
:focus-visible {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
/* No rules anywhere in the chrome. The masthead, the site list and the stage are
separated by space, which is enough on a page with three regions. */
.masthead {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px 48px;
padding: 40px 48px 32px;
min-width: 0;
background: var(--canvas);
}
/* The masthead is a label, not a headline — it names the page and then gets out
of the way of the comparison below it. It stays in the page's sans at a light
weight; a monospace setting made it read as a code sample rather than a title. */
h1 {
font-size: 22px;
font-weight: 400;
}
/* Title and command stay a single left column. The bylines sit opposite as
type, not as a toolbar. Space is the only separator. */
.masthead-brand {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
min-width: 0;
max-width: 100%;
}
.byline-group {
display: flex;
align-items: baseline;
gap: 16px;
margin: 0;
flex-shrink: 0;
}
.byline {
font-size: 13px;
font-weight: 500;
color: var(--ink-2);
text-decoration: none;
}
.byline:hover {
color: var(--ink);
}
.install-cmd {
display: inline-flex;
align-items: center;
gap: 6px;
margin: 0;
max-width: 100%;
font-size: 13px;
color: var(--ink-3);
text-align: left;
overflow-wrap: anywhere;
}
.install-cmd span {
min-width: 0;
overflow-wrap: anywhere;
}
.install-cmd svg {
flex-shrink: 0;
width: 12px;
height: 12px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.install-cmd .icon-copied {
display: none;
}
.install-cmd.is-copied .icon-copy {
display: none;
}
.install-cmd.is-copied .icon-copied {
display: block;
}
.install-cmd:hover {
color: var(--ink-2);
}
.shell {
display: grid;
grid-template-columns: 220px 1fr;
align-items: start;
min-width: 0;
}
.sites {
display: flex;
flex-direction: column;
position: sticky;
top: 0;
z-index: 4;
align-self: start;
max-height: 100vh;
overflow: hidden;
padding: 24px 24px 48px 48px;
min-width: 0;
background: var(--canvas);
}
.nav-head {
flex: 0 0 auto;
margin-bottom: 16px;
}
.nav-label {
margin: 0;
font-size: 13px;
font-weight: 500;
color: var(--ink-3);
}
.sites ol {
list-style: none;
flex: 1 1 auto;
min-height: 0;
margin: 0;
padding: 0;
overflow: auto;
}
.sites li + li {
margin-top: 8px;
}
.sites a {
display: block;
width: 100%;
text-align: left;
padding: 0;
color: var(--ink-2);
font-weight: 500;
text-decoration: none;
}
.sites a:hover {
color: var(--ink);
}
.sites a[aria-current="page"] {
color: var(--ink);
}
.stage {
/* No left padding: the captures start at the sidebar's edge so the page they
show is the leftmost thing in the column, not an inset panel. */
padding: 24px 48px 56px 0;
min-width: 0;
}
.hint {
margin: 0 0 24px;
font-size: 13px;
color: var(--ink-3);
}
h2 {
font-size: 22px;
}
.site {
scroll-margin-top: 24px;
}
.site + .site {
margin-top: 96px;
}
.site h2 {
margin-bottom: 24px;
}
.to-top {
margin: 96px 0 0;
font-size: 13px;
font-weight: 500;
}
.to-top a {
color: var(--ink-2);
text-decoration: none;
}
.to-top a:hover {
color: var(--ink);
}
/* Inverted from the usual segmented control: no track, and the selected segment
carries the fill instead of the unselected ones sitting on it. One shape is
filled rather than two, and on a page with no other chrome the track was the
only surface left. */
.seg {
display: flex;
flex: 0 0 auto;
margin: 16px -4px 0;
padding: 2px;
}
.seg button {
padding: 2px 6px;
font-size: 11px;
font-weight: 500;
letter-spacing: -0.02em;
color: var(--ink-2);
border-radius: 5px;
}
.seg button[aria-pressed="true"] {
background: var(--pressed);
color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
.seg button:hover:not([aria-pressed="true"]) {
color: rgb(0 0 0 / 72%);
}
}
@media (prefers-reduced-motion: no-preference) {
.seg button {
transition: background-color 160ms ease, color 160ms ease;
}
}
.compare {
display: grid;
grid-template-columns: 1fr;
gap: 40px;
min-width: 0;
}
figure {
margin: 0;
min-width: 0;
max-width: 100%;
}
/* The captures carry their own edges — a frame around them was a second border
around a picture of a bordered page. */
.frame {
background: var(--fill);
overflow: hidden;
max-width: 100%;
}
.frame.pending {
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
}
.frame.pending::after {
content: "Not captured yet";
font-size: 13px;
color: var(--ink-3);
}
.shot {
display: block;
width: 100%;
max-width: 100%;
line-height: 0;
cursor: zoom-in;
}
.shot:disabled {
cursor: default;
}
/* A hairline on the capture itself rather than on the frame around it. Most of
these pages are white to the edge, so without it the screenshot dissolves into
the page and you cannot see where the site stops. On the frame it would box
the full column in mobile view, where the capture is only 390px wide. */
.compare img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
vertical-align: top;
border: 1px solid var(--line);
}
[data-viewport="mobile"] .compare .frame {
background: var(--canvas);
display: flex;
justify-content: center;
}
[data-viewport="mobile"] .compare .shot {
width: min(390px, 100%);
}
[data-viewport="mobile"] .compare img {
width: 100%;
height: auto;
}
/* Mobile captures are 390px, so they can sit next to each other at any page
width and still be read — they just scale with the column. Desktop captures
are 1440px and only pair once each shot would not be scaled past legibility. */
[data-viewport="mobile"] .compare {
grid-template-columns: 1fr 1fr;
gap: 16px;
align-items: start;
}
.lightbox {
width: 100%;
height: 100%;
max-width: none;
max-height: none;
margin: 0;
padding: 24px;
border: 0;
background: var(--canvas);
overflow: auto;
cursor: zoom-out;
}
.lightbox::backdrop {
background: var(--canvas);
}
.lightbox img {
display: block;
width: auto;
max-width: 100%;
height: auto;
margin-inline: auto;
border: 1px solid var(--line);
}
@media (min-width: 1600px) {
.compare,
[data-viewport="mobile"] .compare {
grid-template-columns: 1fr 1fr;
gap: 32px;
align-items: start;
}
}
@media (max-width: 960px) {
.masthead,
.stage {
padding-left: 24px;
padding-right: 24px;
}
/* Title and command stay stacked on the left. The byline wraps below. */
.masthead {
flex-direction: column;
align-items: flex-start;
gap: 20px;
padding-top: 24px;
padding-bottom: 16px;
}
.shell {
grid-template-columns: 1fr;
}
/* Full-bleed chip bar: the scroller reaches the viewport edges. Chips have
12px of horizontal padding, so the list inset is 12px less than the 24px
page gutter and the first label lines up with the stage. */
.sites {
padding: 8px 0 12px;
max-height: none;
overflow: visible;
}
.nav-head {
display: none;
}
.seg {
margin: 8px 20px 0;
}
.sites ol {
display: flex;
flex: 0 0 auto;
gap: 4px;
width: 100%;
min-width: 0;
max-width: 100%;
padding: 0 12px;
overflow-x: auto;
overflow-y: hidden;
overscroll-behavior-x: contain;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.sites ol::-webkit-scrollbar {
display: none;
}
.sites li {
flex: 0 0 auto;
}
.sites li + li {
margin-top: 0;
}
.sites a {
width: auto;
min-height: 40px;
padding: 8px 12px;
white-space: nowrap;
}
.site {
scroll-margin-top: calc(var(--nav-height) + 12px);
}
.site + .site {
margin-top: 72px;
}
.to-top {
margin-top: 72px;
}
}
@media (max-width: 960px), (hover: none) and (pointer: coarse) {
.hint,
.seg {
display: none;
}
}