Repository navigation
Expand file tree
/
Copy pathapp.css
More file actions
473 lines (417 loc) · 12.1 KB
/
Copy pathapp.css
File metadata and controls
473 lines (417 loc) · 12.1 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
/*
* GitCert page styles — Tailwind v4, CSS-first config (tailwind rules).
* Theme tokens are taken verbatim from artifacts/design/tokens.md.
*
* Theme selection (mock landing-unauth.dc.html:35-46 structure, adapted):
* prefers-color-scheme is the DEFAULT; an explicit `data-gc-theme` attribute
* on <html> (set by the header toggle, persisted in localStorage) OVERRIDES
* it. `:root[data-gc-theme=…]` is (0,2,0) — it beats the media-scoped
* `:root` (0,1,0) regardless of source order, so the attribute always wins.
*
* Badge SVG colors are NOT here — badges stay self-contained — EXCEPT the
* `--gc-*` overrides below, which exist so the toggle re-colors inline
* auto-theme badges (see the comment on that block).
*/
@import 'tailwindcss';
@source '../pages';
:root,
:root[data-gc-theme='light'] {
/*
* Dashboard badge-preview panel background (mock dashboard.dc.html
* previewStyle): fixed #f7f5f0 / #1b1a18 per the RESOLVED badge theme,
* independent of the page palette — so explicit light/dark previews
* cannot reuse the theme-relative tokens. `--preview` covers theme=auto
* (follows prefers-color-scheme like the auto badge itself).
*/
--preview: #f7f5f0;
--paper: #faf9f6;
--ink: #1c1b19;
--body: #4a4842;
--muted: #8a887e;
--soft: #6c6b63;
--faint: #a6a49a;
--hair: rgba(28, 27, 25, 0.14);
--hair2: rgba(28, 27, 25, 0.1);
--hair-strong: rgba(28, 27, 25, 0.16);
--card: #ffffff;
--panel: #f7f5f0;
--panel2: #f4f2ec;
--field: #faf9f6;
--accent: #2f6d4f;
/*
* Stale amber (dashboard repo rows, comp Dashboard.dc.html `amber`):
* a repo whose stats are older than the 24h badge stale threshold.
* Deliberately NOT an error color — a stale badge is a designed state.
*/
--stale: #b57614;
--avatar: #e9e7e0;
--dot: #d9d6cd;
--nav: rgba(250, 249, 246, 0.9);
}
@media (prefers-color-scheme: dark) {
:root {
--preview: #1b1a18;
--paper: #1b1a18;
--ink: #e8e6e0;
--body: #bab7ad;
--muted: #98958c;
--soft: #918f86;
--faint: #6f6d65;
--hair: rgba(232, 230, 224, 0.15);
--hair2: rgba(232, 230, 224, 0.1);
--hair-strong: rgba(232, 230, 224, 0.2);
--card: #232220;
--panel: #201f1c;
--panel2: #26241f;
--field: #1b1a18;
--accent: #5aa07d;
--stale: #e3b341;
--avatar: #2f2d29;
--dot: #3a3833;
--nav: rgba(27, 26, 24, 0.9);
}
}
:root[data-gc-theme='dark'] {
--preview: #1b1a18;
--paper: #1b1a18;
--ink: #e8e6e0;
--body: #bab7ad;
--muted: #98958c;
--soft: #918f86;
--faint: #6f6d65;
--hair: rgba(232, 230, 224, 0.15);
--hair2: rgba(232, 230, 224, 0.1);
--hair-strong: rgba(232, 230, 224, 0.2);
--card: #232220;
--panel: #201f1c;
--panel2: #26241f;
--field: #1b1a18;
--accent: #5aa07d;
--stale: #e3b341;
--avatar: #2f2d29;
--dot: #3a3833;
--nav: rgba(27, 26, 24, 0.9);
}
/*
* Inline auto-theme badge re-coloring for the toggle. Auto badges embed
* `svg{--gc-*:…}` plus a prefers-color-scheme block in their own <style>
* (src/badges/theme.ts resolveColors); inlined in a page, those rules are
* document-wide but only (0,0,1). These (0,2,1) attribute-scoped rules beat
* BOTH the badge's light table and its media-query dark table, so flipping
* data-gc-theme re-colors inline badges; with no attribute set, the badge's
* internal media query governs, matching the page default. Values mirror
* src/badges/theme.ts (FLAT_COLORS normal state + PILL_COLORS) — keep in
* sync; the theme-consistency page test guards this.
*/
:root[data-gc-theme='light'] svg {
--gc-labelBg: #4b4a45;
--gc-labelText: #f2f0ea;
--gc-valueBg: #2f6d4f;
--gc-valueText: #ffffff;
--gc-seal: #ffffff;
--gc-bg: #faf9f6;
--gc-border: rgba(28, 27, 25, 0.16);
--gc-tx: #24231f;
--gc-muted: #6c6b63;
}
:root[data-gc-theme='dark'] svg {
--gc-labelBg: #33322e;
--gc-labelText: #dcdad2;
--gc-valueBg: #2f6d4f;
--gc-valueText: #ffffff;
--gc-seal: #ffffff;
--gc-bg: #232220;
--gc-border: rgba(232, 230, 224, 0.22);
--gc-tx: #e8e6e0;
--gc-muted: #a29f96;
}
/*
* Theme-toggle icon swap (mock: moon shown in light mode, sun in dark).
* Media query sets the no-attribute default; the (0,3,0) attribute-scoped
* rules override it when the toggle has been used.
*/
[data-theme-icon='sun'] {
display: none;
}
@media (prefers-color-scheme: dark) {
[data-theme-icon='sun'] {
display: block;
}
[data-theme-icon='moon'] {
display: none;
}
}
:root[data-gc-theme='light'] [data-theme-icon='sun'] {
display: none;
}
:root[data-gc-theme='light'] [data-theme-icon='moon'] {
display: block;
}
:root[data-gc-theme='dark'] [data-theme-icon='sun'] {
display: block;
}
:root[data-gc-theme='dark'] [data-theme-icon='moon'] {
display: none;
}
/*
* Pure-CSS <details> disclosures: the nav account menu (layout.tsx
* AccountMenu) and the docs mobile jump-list (docs.tsx JumpList). Strip the
* native summary marker so the "Account ▾" / "On this page ▾" triggers read
* cleanly, and rotate the caret when open. No JS: the user handle never
* enters a script.
*/
[data-account-menu] > summary,
[data-jumplist] > summary {
list-style: none;
}
[data-account-menu] > summary::-webkit-details-marker,
[data-jumplist] > summary::-webkit-details-marker {
display: none;
}
[data-account-menu][open] [data-account-caret],
[data-jumplist][open] [data-account-caret] {
transform: rotate(180deg);
}
/*
* Docs scrollspy active-nav (docs.tsx SCROLLSPY_SCRIPT toggles `data-active`
* on the desktop sidebar link of the section in view). UNLAYERED on purpose —
* the link carries Tailwind's layered `border-transparent` / `text-muted`
* utilities, and an unlayered rule out-cascades any @layer utilities, so this
* accent border + ink text wins without !important (same cascade trick as the
* account-caret block above). The mock (docs.dc.html line 373) is the
* authoritative active treatment: accent left-border + ink text.
*/
[data-spy-link][data-active] {
border-color: var(--accent);
color: var(--ink);
}
@theme inline {
--color-paper: var(--paper);
--color-ink: var(--ink);
--color-body: var(--body);
--color-muted: var(--muted);
--color-soft: var(--soft);
--color-faint: var(--faint);
--color-hair: var(--hair);
--color-hair2: var(--hair2);
--color-hair-strong: var(--hair-strong);
--color-card: var(--card);
--color-panel: var(--panel);
--color-panel2: var(--panel2);
--color-field: var(--field);
--color-accent: var(--accent);
--color-stale: var(--stale);
--color-avatar: var(--avatar);
--color-dot: var(--dot);
--color-nav: var(--nav);
--color-preview: var(--preview);
--color-preview-light: #f7f5f0;
--color-preview-dark: #1b1a18;
--font-display:
'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
--font-mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
}
/*
* Base element styling ported from the design's shared stylesheet. The link
* rules live in @layer base so Tailwind color utilities (layered later)
* override them — the mock's equivalents were inline styles, which
* out-cascaded its own a{} rule. Unlayered, this rule beat text-paper on
* the hero CTA and text-muted on the nav link, leaking accent green into
* non-verified surfaces (design reserves accent for verified states).
*/
body {
background: var(--paper);
}
@layer base {
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
text-underline-offset: 2px;
}
a[data-nav]:hover {
text-decoration: none;
}
}
::selection {
background: rgba(90, 160, 125, 0.28);
}
/* Dashboard repo-list scrollbar (mock dashboard.dc.html helmet CSS). */
[data-repo-scroll] {
scrollbar-width: thin;
scrollbar-color: var(--hair-strong) transparent;
}
[data-repo-scroll]::-webkit-scrollbar {
width: 6px;
}
[data-repo-scroll]::-webkit-scrollbar-thumb {
background: var(--hair-strong);
border-radius: 3px;
}
[data-repo-scroll]::-webkit-scrollbar-track {
background: transparent;
}
/*
* Dashboard repo-row motion (comp Dashboard.dc.html helmet CSS). Driven by
* data attributes rather than utility classes so the inline builder script
* toggles one attribute (as it already does for `data-copied`) instead of
* juggling class lists.
*/
@keyframes gcpulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.42;
}
}
/* `collecting…` rows breathe until the first stats row lands. */
[data-gc-pulse] {
animation: gcpulse 1.6s ease-in-out infinite;
}
@keyframes gcspin {
to {
transform: rotate(360deg);
}
}
/* The copy-button loading spinner (a `<g data-gc-spin>`). `transform-origin`
* is REQUIRED: without it the rotation defaults to the SVG viewBox corner
* (0 0), so the spinner orbits that corner and visibly slides instead of
* spinning in place. `center` resolves to the viewBox centre (12,12). */
[data-gc-spin] {
transform-origin: center;
animation: gcspin 0.9s linear infinite;
}
[data-gear],
[data-sync] {
transform-origin: center;
transition: transform 0.6s cubic-bezier(0.34, 1.42, 0.64, 1);
}
a:hover [data-gear] {
transform: rotate(180deg);
}
/*
* Seal hover-draw. `data-seal-check` is emitted by src/badges/seal.ts on the
* check path only, so every page seal (header, docs, verify, landing, auth)
* draws on hover from ONE canonical draw site. Inert inside badge SVGs: those
* are self-contained documents with their own inline <style> and no gcdraw
* keyframe, and dasharray 9 > the path's ~8.5 length, so offset 0 renders solid.
*/
@keyframes gcdraw {
from {
stroke-dashoffset: 9;
}
to {
stroke-dashoffset: 0;
}
}
[data-seal-check] {
stroke-dasharray: 9;
stroke-dashoffset: 0;
}
svg:hover [data-seal-check] {
animation: gcdraw 0.42s ease;
}
/*
* The shared success check (copy done, sync done, verify valid).
* `animation-fill-mode: both` means toggling the node between display:none and
* visible restarts the draw — no JS-side animation restart hack is needed.
*/
@keyframes gccheckdraw {
0% {
stroke-dashoffset: 27;
opacity: 0;
transform: scale(0.5);
}
25% {
opacity: 1;
}
100% {
stroke-dashoffset: 0;
opacity: 1;
transform: scale(1);
}
}
[data-gc-check] {
transform-origin: 12px 12px;
stroke-dasharray: 27;
animation: gccheckdraw 0.42s cubic-bezier(0.4, 0, 0.2, 1) both;
}
/*
* Attribute-driven phase gating (same pattern as [data-account-menu][open] and
* [data-spy-link][data-active]): the inline scripts toggle ONE attribute on the
* button and CSS swaps between static icon children. No DOM is built in script.
*/
[data-copy-icon='loading'],
[data-copy-icon='done'] {
display: none;
}
[data-copy-phase='loading'] [data-copy-icon='idle'],
[data-copy-phase='done'] [data-copy-icon='idle'] {
display: none;
}
[data-copy-phase='loading'] [data-copy-icon='loading'],
[data-copy-phase='done'] [data-copy-icon='done'] {
display: block;
}
[data-sync-icon='done'] {
display: none;
}
[data-sync-phase='loading'] [data-sync-icon='idle'] {
transform-origin: center;
animation: gcspin 0.9s linear infinite;
}
[data-sync-phase='done'] [data-sync-icon='idle'] {
display: none;
}
[data-sync-phase='done'] [data-sync-icon='done'] {
display: block;
}
[data-verify-icon='loading'],
[data-verify-icon='done'],
[data-verify-valid] {
display: none;
}
[data-verify-phase='loading'] [data-verify-icon='loading'],
[data-verify-phase='done'] [data-verify-icon='done'] {
display: block;
}
[data-verify-phase='done'] [data-verify-idle] {
display: none;
}
[data-verify-phase='done'] [data-verify-valid] {
display: inline;
}
/* Non-interactive while the real verification promise is in flight or settled. */
[data-verify-phase='loading'],
[data-verify-phase='done'] {
cursor: default;
}
[data-verify-phase='loading'] {
opacity: 0.6;
}
/* Account-group collapse chevron: points down open, -90° collapsed. */
[data-acct-chevron] {
transition: transform 0.18s ease;
}
[aria-expanded='false'] [data-acct-chevron] {
transform: rotate(-90deg);
}
@media (prefers-reduced-motion: reduce) {
[data-gc-pulse],
[data-gc-spin],
[data-gc-check],
[data-seal-check],
svg:hover [data-seal-check],
[data-sync-phase='loading'] [data-sync-icon='idle'] {
animation: none;
}
[data-gear],
[data-sync],
[data-acct-chevron] {
transition: none;
}
}