@specglass/theme-default 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/design-tokens.test.d.ts +1 -0
- package/dist/__tests__/design-tokens.test.js +107 -0
- package/dist/islands/CopyButton.js +2 -6
- package/dist/islands/LanguageToggle.d.ts +16 -0
- package/dist/islands/LanguageToggle.js +88 -0
- package/dist/islands/SearchPalette.js +57 -8
- package/dist/islands/ThemeToggle.js +1 -1
- package/dist/scripts/code-block-enhancer.js +6 -3
- package/dist/themes/notdiamond-dark.json +168 -0
- package/dist/themes/notdiamond-light.json +168 -0
- package/dist/ui/command.js +2 -2
- package/dist/ui/dialog.js +2 -2
- package/dist/utils/shiki.d.ts +1 -1
- package/dist/utils/shiki.js +5 -3
- package/package.json +5 -3
- package/src/components/ApiAuth.astro +31 -4
- package/src/components/ApiEndpoint.astro +67 -44
- package/src/components/ApiNavigation.astro +8 -11
- package/src/components/ApiParameters.astro +113 -162
- package/src/components/ApiResponse.astro +1 -1
- package/src/components/Callout.astro +59 -18
- package/src/components/Card.astro +4 -4
- package/src/components/CodeBlock.astro +7 -7
- package/src/components/CodeBlockGroup.astro +3 -3
- package/src/components/CodeExample.astro +183 -0
- package/src/components/EditLink.astro +53 -0
- package/src/components/Footer.astro +87 -25
- package/src/components/Header.astro +63 -7
- package/src/components/Sidebar.astro +43 -11
- package/src/components/TableOfContents.astro +5 -5
- package/src/components/Tabs.astro +51 -20
- package/src/islands/CopyButton.tsx +36 -34
- package/src/islands/LanguageToggle.tsx +214 -0
- package/src/islands/SearchPalette.tsx +121 -39
- package/src/islands/ThemeToggle.tsx +45 -48
- package/src/layouts/ApiReferencePage.astro +67 -56
- package/src/layouts/DocPage.astro +32 -27
- package/src/layouts/LandingPage.astro +348 -27
- package/src/scripts/code-block-enhancer.ts +8 -3
- package/src/styles/global.css +388 -59
- package/src/themes/notdiamond-dark.json +168 -0
- package/src/themes/notdiamond-light.json +168 -0
- package/src/ui/command.tsx +1 -2
- package/src/ui/dialog.tsx +8 -5
- package/src/utils/shiki.ts +5 -3
package/src/styles/global.css
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
|
-
@plugin "tailwindcss-animate";
|
|
3
2
|
|
|
4
3
|
/*
|
|
5
4
|
* Source directives — tell Tailwind v4 to scan component/layout templates
|
|
@@ -20,47 +19,85 @@
|
|
|
20
19
|
* Override via site-level CSS or tailwind @theme extensions.
|
|
21
20
|
*/
|
|
22
21
|
@theme {
|
|
23
|
-
/* Primary
|
|
24
|
-
--color-primary: oklch(0.
|
|
25
|
-
--color-primary-light: oklch(0.
|
|
26
|
-
--color-primary-dark: oklch(0.
|
|
27
|
-
|
|
28
|
-
/* Surface
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--color-
|
|
32
|
-
--color-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
--color-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
22
|
+
/* Primary accent — Vercel blue (neutral, minimal) */
|
|
23
|
+
--color-primary: oklch(0.55 0.19 260);
|
|
24
|
+
--color-primary-light: oklch(0.62 0.17 260);
|
|
25
|
+
--color-primary-dark: oklch(0.48 0.21 260);
|
|
26
|
+
|
|
27
|
+
/* Surface layers — light mode (Zinc palette)
|
|
28
|
+
* 3-tier depth system: base → raised → elevated
|
|
29
|
+
* Creates visual hierarchy without heavy borders */
|
|
30
|
+
--color-surface-0: oklch(0.985 0 0);
|
|
31
|
+
--color-surface-1: oklch(0.967 0.001 286.375);
|
|
32
|
+
--color-surface-2: oklch(1 0 0);
|
|
33
|
+
|
|
34
|
+
/* Surface layers — dark mode (Zinc scale, deeper contrast)
|
|
35
|
+
* 0: near-black (#09090b), 1: zinc-900 (#18181b), 2: zinc-800 (#27272a)
|
|
36
|
+
* Wider gaps between layers create stronger visual hierarchy */
|
|
37
|
+
--color-surface-0-dark: oklch(0.119 0.004 285.823);
|
|
38
|
+
--color-surface-1-dark: oklch(0.175 0.005 285.885);
|
|
39
|
+
--color-surface-2-dark: oklch(0.235 0.006 286.033);
|
|
40
|
+
|
|
41
|
+
/* Legacy surface aliases (backward compat — map to layer 0) */
|
|
42
|
+
--color-surface: oklch(0.985 0 0);
|
|
43
|
+
--color-surface-dark: oklch(0.119 0.004 285.823);
|
|
44
|
+
|
|
45
|
+
/* Deprecated: sidebar tokens — prefer surface-1 for sidebar backgrounds */
|
|
46
|
+
--color-sidebar-bg: oklch(0.967 0.001 286.375);
|
|
47
|
+
--color-sidebar-bg-dark: oklch(0.175 0.005 285.885);
|
|
48
|
+
|
|
49
|
+
/* Text colors (Zinc scale) */
|
|
50
|
+
--color-text: oklch(0.141 0.005 285.823);
|
|
51
|
+
--color-text-dark: oklch(0.985 0 0);
|
|
52
|
+
--color-text-muted: oklch(0.552 0.016 285.938);
|
|
53
|
+
--color-text-muted-dark: oklch(0.705 0.015 286.067);
|
|
54
|
+
|
|
55
|
+
/* Border colors (Zinc scale) */
|
|
56
|
+
--color-border: oklch(0.920 0.004 286.32);
|
|
57
|
+
--color-border-dark: oklch(0.235 0.006 286.033);
|
|
58
|
+
|
|
59
|
+
/* Raised surfaces (e.g., kbd badges, chips) — maps to surface-2 */
|
|
60
|
+
--color-surface-raised: oklch(0.920 0.004 286.32);
|
|
61
|
+
--color-surface-raised-dark: oklch(0.235 0.006 286.033);
|
|
47
62
|
|
|
48
63
|
/* Interactive states */
|
|
49
|
-
--color-hover-bg: oklch(0.
|
|
50
|
-
--color-hover-bg-dark: oklch(0.
|
|
64
|
+
--color-hover-bg: oklch(0.967 0.001 286.375);
|
|
65
|
+
--color-hover-bg-dark: oklch(0.200 0.005 286.033);
|
|
51
66
|
|
|
52
67
|
/* Layout dimensions */
|
|
53
68
|
--width-sidebar: 16rem;
|
|
54
69
|
--width-toc: 14rem;
|
|
55
|
-
--width-content-max:
|
|
70
|
+
--width-content-max: 45rem;
|
|
56
71
|
--height-header: 3.5rem;
|
|
57
72
|
|
|
58
|
-
/* Spacing
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/*
|
|
62
|
-
--
|
|
73
|
+
/* Spacing — 8px grid system
|
|
74
|
+
* Every spacing value is a multiple of 8px (0.5rem).
|
|
75
|
+
* This creates subconscious visual harmony across the page. */
|
|
76
|
+
--spacing-1: 0.5rem; /* 8px */
|
|
77
|
+
--spacing-2: 1rem; /* 16px */
|
|
78
|
+
--spacing-3: 1.5rem; /* 24px */
|
|
79
|
+
--spacing-4: 2rem; /* 32px */
|
|
80
|
+
--spacing-5: 2.5rem; /* 40px */
|
|
81
|
+
--spacing-6: 3rem; /* 48px */
|
|
82
|
+
--spacing-page: 1.5rem; /* 24px — page horizontal padding */
|
|
83
|
+
--spacing-section: 3rem; /* 48px — between major sections */
|
|
84
|
+
--spacing-subsection: 2rem; /* 32px — between subsections */
|
|
85
|
+
|
|
86
|
+
/* Typography — weight-over-size hierarchy
|
|
87
|
+
* Inspired by Vercel docs: headings are closer in size but differ
|
|
88
|
+
* in weight, tracking, and opacity. This creates elegant hierarchy
|
|
89
|
+
* without the "shouty" feel of dramatically large headings.
|
|
90
|
+
* H1: 2rem/bold, H2: 1.5rem/semibold, H3: 1.25rem/semibold, H4: 1.125rem/medium */
|
|
91
|
+
--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
|
|
63
92
|
--font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
|
|
93
|
+
--font-size-h1: 2.5rem;
|
|
94
|
+
--font-size-h2: 1.5rem;
|
|
95
|
+
--font-size-h3: 1.25rem;
|
|
96
|
+
--font-size-h4: 1.125rem;
|
|
97
|
+
--tracking-tight: -0.04em;
|
|
98
|
+
--tracking-snug: -0.03em;
|
|
99
|
+
--tracking-body: -0.02em;
|
|
100
|
+
--tracking-wide: -0.015em;
|
|
64
101
|
|
|
65
102
|
/* Transitions */
|
|
66
103
|
--transition-normal: 150ms;
|
|
@@ -78,12 +115,15 @@
|
|
|
78
115
|
* This means ALL existing Tailwind classes (bg-surface, text-text, etc.)
|
|
79
116
|
* automatically respond to dark mode — zero component template changes needed.
|
|
80
117
|
*
|
|
81
|
-
* Note: --color-primary is intentionally NOT remapped.
|
|
82
|
-
* oklch(0.
|
|
83
|
-
*
|
|
118
|
+
* Note: --color-primary is intentionally NOT remapped. Electric Green
|
|
119
|
+
* oklch(0.82 0.24 135) has excellent contrast (~10:1) on Zinc-950 dark surface.
|
|
120
|
+
* For lighter accents, use dark:text-primary-light.
|
|
84
121
|
*/
|
|
85
122
|
.dark {
|
|
86
123
|
--color-surface: var(--color-surface-dark);
|
|
124
|
+
--color-surface-0: var(--color-surface-0-dark);
|
|
125
|
+
--color-surface-1: var(--color-surface-1-dark);
|
|
126
|
+
--color-surface-2: var(--color-surface-2-dark);
|
|
87
127
|
--color-sidebar-bg: var(--color-sidebar-bg-dark);
|
|
88
128
|
--color-text: var(--color-text-dark);
|
|
89
129
|
--color-text-muted: var(--color-text-muted-dark);
|
|
@@ -103,7 +143,9 @@ body {
|
|
|
103
143
|
font-family: var(--font-sans);
|
|
104
144
|
color: var(--color-text);
|
|
105
145
|
background-color: var(--color-surface);
|
|
106
|
-
|
|
146
|
+
font-size: 1rem;
|
|
147
|
+
line-height: 1.75;
|
|
148
|
+
letter-spacing: -0.011em;
|
|
107
149
|
-webkit-font-smoothing: antialiased;
|
|
108
150
|
-moz-osx-font-smoothing: grayscale;
|
|
109
151
|
transition: color var(--transition-normal) ease,
|
|
@@ -112,42 +154,96 @@ body {
|
|
|
112
154
|
|
|
113
155
|
/* ─── Content Prose Styles ──────────────────────────────────── */
|
|
114
156
|
|
|
157
|
+
/* Weight-over-size heading hierarchy:
|
|
158
|
+
* H1: bold, tight tracking — the anchor
|
|
159
|
+
* H2: semibold, snug tracking — section breaks
|
|
160
|
+
* H3: semibold, body tracking — subsections
|
|
161
|
+
* H4: medium weight — subtle grouping
|
|
162
|
+
* Size differences are deliberately small; weight + tracking do the work. */
|
|
115
163
|
.sg-content h1 {
|
|
116
|
-
|
|
164
|
+
font-size: var(--font-size-h1);
|
|
165
|
+
font-weight: 700;
|
|
166
|
+
letter-spacing: var(--tracking-tight);
|
|
167
|
+
line-height: 1.2;
|
|
168
|
+
margin-top: 0;
|
|
169
|
+
margin-bottom: var(--spacing-3); /* 24px */
|
|
117
170
|
}
|
|
118
171
|
.sg-content h2 {
|
|
119
|
-
|
|
172
|
+
font-size: var(--font-size-h2);
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
letter-spacing: var(--tracking-snug);
|
|
175
|
+
line-height: 1.3;
|
|
176
|
+
margin-top: var(--spacing-6); /* 48px */
|
|
177
|
+
margin-bottom: var(--spacing-2); /* 16px */
|
|
178
|
+
padding-bottom: var(--spacing-1); /* 8px */
|
|
120
179
|
}
|
|
121
180
|
.sg-content h3 {
|
|
122
|
-
|
|
181
|
+
font-size: var(--font-size-h3);
|
|
182
|
+
font-weight: 600;
|
|
183
|
+
letter-spacing: var(--tracking-body);
|
|
184
|
+
line-height: 1.35;
|
|
185
|
+
margin-top: var(--spacing-4); /* 32px */
|
|
186
|
+
margin-bottom: var(--spacing-1); /* 8px */
|
|
123
187
|
}
|
|
124
188
|
.sg-content h4 {
|
|
125
|
-
|
|
189
|
+
font-size: var(--font-size-h4);
|
|
190
|
+
font-weight: 500;
|
|
191
|
+
letter-spacing: var(--tracking-wide);
|
|
192
|
+
line-height: 1.4;
|
|
193
|
+
margin-top: var(--spacing-3); /* 24px */
|
|
194
|
+
margin-bottom: var(--spacing-1); /* 8px */
|
|
126
195
|
}
|
|
127
196
|
|
|
128
197
|
.sg-content p {
|
|
129
|
-
|
|
198
|
+
line-height: 1.625;
|
|
199
|
+
margin-block: var(--spacing-2); /* 16px */
|
|
130
200
|
}
|
|
131
201
|
.sg-content ul,
|
|
132
202
|
.sg-content ol {
|
|
133
|
-
|
|
203
|
+
margin-block: var(--spacing-2); /* 16px */
|
|
204
|
+
padding-left: var(--spacing-3); /* 24px */
|
|
205
|
+
}
|
|
206
|
+
.sg-content ul {
|
|
207
|
+
list-style-type: disc;
|
|
208
|
+
}
|
|
209
|
+
.sg-content ol {
|
|
210
|
+
list-style-type: decimal;
|
|
134
211
|
}
|
|
135
212
|
.sg-content li {
|
|
136
|
-
|
|
213
|
+
margin-block: var(--spacing-1); /* 8px */
|
|
214
|
+
}
|
|
215
|
+
.sg-content li::marker {
|
|
216
|
+
color: var(--color-text-muted);
|
|
137
217
|
}
|
|
138
218
|
|
|
139
219
|
.sg-content a {
|
|
140
|
-
@apply text-
|
|
141
|
-
hover:decoration-
|
|
220
|
+
@apply text-text underline decoration-border/60 decoration-1 underline-offset-4
|
|
221
|
+
hover:decoration-text/60 transition-colors;
|
|
142
222
|
}
|
|
143
223
|
|
|
144
224
|
.sg-content code:not(pre code) {
|
|
145
|
-
|
|
225
|
+
font-size: 0.8125em;
|
|
226
|
+
font-family: var(--font-mono);
|
|
227
|
+
padding: 0.125em 0.375em;
|
|
228
|
+
border-radius: 0.25rem;
|
|
229
|
+
border: 1px solid var(--color-border);
|
|
230
|
+
@apply bg-surface-1;
|
|
146
231
|
}
|
|
147
232
|
|
|
148
233
|
.sg-content pre {
|
|
149
|
-
|
|
150
|
-
|
|
234
|
+
border-radius: 0.5rem;
|
|
235
|
+
overflow-x: auto;
|
|
236
|
+
font-size: 0.8125rem;
|
|
237
|
+
line-height: 1.7;
|
|
238
|
+
padding: var(--spacing-2) var(--spacing-3); /* 16px 24px */
|
|
239
|
+
margin-block: var(--spacing-3); /* 24px */
|
|
240
|
+
font-feature-settings: "calt" 1, "liga" 1;
|
|
241
|
+
border: 1px solid var(--color-border);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.sg-content pre code,
|
|
245
|
+
pre > code {
|
|
246
|
+
font-feature-settings: "calt" 1, "liga" 1;
|
|
151
247
|
}
|
|
152
248
|
|
|
153
249
|
/* ─── Shiki Dual-Theme CSS Variables ────────────────────────── */
|
|
@@ -165,26 +261,27 @@ pre > code span {
|
|
|
165
261
|
background-color: transparent;
|
|
166
262
|
}
|
|
167
263
|
pre {
|
|
168
|
-
background-color: var(--shiki-light-bg, #
|
|
264
|
+
background-color: var(--shiki-light-bg, #fafafa) !important;
|
|
169
265
|
}
|
|
170
266
|
.dark pre > code,
|
|
171
267
|
.dark pre > code span {
|
|
172
268
|
color: var(--shiki-dark, var(--color-text, #e5e7eb));
|
|
173
269
|
}
|
|
174
270
|
.dark pre {
|
|
175
|
-
background-color: var(--shiki-dark-bg, #
|
|
271
|
+
background-color: var(--shiki-dark-bg, #09090b) !important;
|
|
272
|
+
border-color: oklch(0.235 0.006 286.033);
|
|
176
273
|
}
|
|
177
274
|
|
|
178
275
|
/* Line highlighting — Astro/Shiki marks highlighted lines with .line.highlighted */
|
|
179
276
|
pre code .line.highlighted {
|
|
180
|
-
background-color: oklch(0.
|
|
277
|
+
background-color: oklch(0.55 0.02 260 / 0.08);
|
|
181
278
|
display: inline-block;
|
|
182
279
|
width: 100%;
|
|
183
280
|
margin: 0 -1.25rem;
|
|
184
281
|
padding: 0 1.25rem;
|
|
185
282
|
}
|
|
186
283
|
.dark pre code .line.highlighted {
|
|
187
|
-
background-color: oklch(0.
|
|
284
|
+
background-color: oklch(0.7 0.01 260 / 0.1);
|
|
188
285
|
}
|
|
189
286
|
|
|
190
287
|
/* ─── Code Block Copy Button (fenced code blocks) ──────────── */
|
|
@@ -228,26 +325,258 @@ pre code .line.highlighted {
|
|
|
228
325
|
}
|
|
229
326
|
|
|
230
327
|
.sg-content blockquote {
|
|
231
|
-
|
|
328
|
+
border-left: 2px solid var(--color-border);
|
|
329
|
+
padding-left: var(--spacing-2); /* 16px */
|
|
330
|
+
margin-block: var(--spacing-2); /* 16px */
|
|
331
|
+
@apply text-text-muted;
|
|
232
332
|
}
|
|
233
333
|
|
|
234
334
|
.sg-content table {
|
|
235
|
-
|
|
335
|
+
width: 100%;
|
|
336
|
+
font-size: 0.875rem;
|
|
337
|
+
margin-block: var(--spacing-3); /* 24px */
|
|
236
338
|
}
|
|
237
339
|
|
|
238
340
|
.sg-content th {
|
|
239
|
-
|
|
341
|
+
text-align: left;
|
|
342
|
+
font-weight: 600;
|
|
343
|
+
padding: var(--spacing-1); /* 8px */
|
|
344
|
+
@apply border-b-2 border-border;
|
|
240
345
|
}
|
|
241
346
|
|
|
242
347
|
.sg-content td {
|
|
243
|
-
|
|
348
|
+
padding: var(--spacing-1); /* 8px */
|
|
349
|
+
@apply border-b border-border;
|
|
244
350
|
}
|
|
245
351
|
|
|
246
352
|
.sg-content hr {
|
|
247
|
-
|
|
353
|
+
margin-block: var(--spacing-6); /* 48px */
|
|
354
|
+
@apply border-border;
|
|
248
355
|
}
|
|
249
356
|
|
|
250
357
|
.sg-content img {
|
|
251
|
-
|
|
358
|
+
border-radius: 0.5rem;
|
|
359
|
+
max-width: 100%;
|
|
360
|
+
margin-block: var(--spacing-3); /* 24px */
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ─── Code Block Enhancements (Story 11.1) ────────────────── */
|
|
364
|
+
|
|
365
|
+
/* Fenced code block filename header — matches CodeBlock.astro header */
|
|
366
|
+
.code-block--fenced .code-block-header {
|
|
367
|
+
display: flex;
|
|
368
|
+
align-items: center;
|
|
369
|
+
padding: 0.5rem 1rem;
|
|
370
|
+
background-color: var(--code-block-header-bg, oklch(0.967 0.001 286.375));
|
|
371
|
+
border-bottom: 1px solid var(--code-block-border, oklch(0.92 0.004 286.32));
|
|
372
|
+
font-size: 0.8125rem;
|
|
373
|
+
font-family: var(--font-mono);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.code-block--fenced .code-block-title {
|
|
377
|
+
color: var(--code-block-title-color, oklch(0.552 0.016 285.938));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* Line numbers via CSS counter */
|
|
381
|
+
.code-block--line-numbers pre code {
|
|
382
|
+
counter-reset: line;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.code-block--line-numbers pre code .line::before {
|
|
386
|
+
counter-increment: line;
|
|
387
|
+
content: counter(line);
|
|
388
|
+
display: inline-block;
|
|
389
|
+
width: 2.5rem;
|
|
390
|
+
margin-right: 1rem;
|
|
391
|
+
text-align: right;
|
|
392
|
+
color: oklch(0.552 0.016 285.938 / 0.4);
|
|
393
|
+
font-size: 0.8125em;
|
|
394
|
+
user-select: none;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* Highlighted lines */
|
|
398
|
+
.code-block pre code .line.highlighted {
|
|
399
|
+
background: oklch(0.55 0.02 260 / 0.06);
|
|
400
|
+
margin: 0 -1.5rem;
|
|
401
|
+
padding: 0 1.5rem;
|
|
402
|
+
display: block;
|
|
403
|
+
border-left: 3px solid oklch(0.55 0.10 260 / 0.4);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Diff indicators */
|
|
407
|
+
.code-block--diff pre code .line {
|
|
408
|
+
position: relative;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.code-block--diff pre code .line.diff-add {
|
|
412
|
+
background: oklch(0.87 0.15 145 / 0.1);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.code-block--diff pre code .line.diff-add::before {
|
|
416
|
+
content: "+";
|
|
417
|
+
position: absolute;
|
|
418
|
+
left: 0.5rem;
|
|
419
|
+
color: oklch(0.72 0.19 145);
|
|
420
|
+
font-weight: 600;
|
|
421
|
+
user-select: none;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.code-block--diff pre code .line.diff-remove {
|
|
425
|
+
background: oklch(0.65 0.2 25 / 0.1);
|
|
426
|
+
opacity: 0.7;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.code-block--diff pre code .line.diff-remove::before {
|
|
430
|
+
content: "-";
|
|
431
|
+
position: absolute;
|
|
432
|
+
left: 0.5rem;
|
|
433
|
+
color: oklch(0.65 0.2 25);
|
|
434
|
+
font-weight: 600;
|
|
435
|
+
user-select: none;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.code-block--diff pre code .line {
|
|
439
|
+
padding-left: 1.5rem;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/* Mobile: scroll gradient on code blocks */
|
|
443
|
+
@media (max-width: 768px) {
|
|
444
|
+
.code-block-body {
|
|
445
|
+
position: relative;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.code-block-body::after {
|
|
449
|
+
content: "";
|
|
450
|
+
position: absolute;
|
|
451
|
+
top: 0;
|
|
452
|
+
right: 0;
|
|
453
|
+
bottom: 0;
|
|
454
|
+
width: 2rem;
|
|
455
|
+
background: linear-gradient(to right, transparent, var(--color-surface-0));
|
|
456
|
+
pointer-events: none;
|
|
457
|
+
opacity: 0;
|
|
458
|
+
transition: opacity 150ms ease;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.code-block-body:hover::after {
|
|
462
|
+
opacity: 1;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
/* ─── Copy Button Icon Fade ────────────────────────────────── */
|
|
469
|
+
.sg-copy-btn .sg-copy-icon,
|
|
470
|
+
.sg-copy-btn .sg-copy-check {
|
|
471
|
+
position: absolute;
|
|
472
|
+
top: 50%;
|
|
473
|
+
left: 50%;
|
|
474
|
+
transform: translate(-50%, -50%);
|
|
475
|
+
transition: opacity 150ms ease;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.sg-copy-btn .sg-copy-icon {
|
|
479
|
+
opacity: 1;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.sg-copy-btn .sg-copy-check {
|
|
483
|
+
opacity: 0;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.sg-copy-btn.sg-copy-btn-copied .sg-copy-icon {
|
|
487
|
+
opacity: 0;
|
|
252
488
|
}
|
|
253
489
|
|
|
490
|
+
.sg-copy-btn.sg-copy-btn-copied .sg-copy-check {
|
|
491
|
+
opacity: 1;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
@media (prefers-reduced-motion: reduce) {
|
|
495
|
+
.sg-copy-btn .sg-copy-icon,
|
|
496
|
+
.sg-copy-btn .sg-copy-check {
|
|
497
|
+
transition: none;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* ─── Brand Glow Effects (removed — Vercel-minimal approach) ─── */
|
|
502
|
+
|
|
503
|
+
/* All glow/pulse animations removed for clean, professional look.
|
|
504
|
+
* .sg-glow, .sg-glow-hover, .sg-pulse-glow classes are now no-ops
|
|
505
|
+
* for backward compatibility with existing templates. */
|
|
506
|
+
.sg-glow,
|
|
507
|
+
.sg-glow-hover:hover,
|
|
508
|
+
.sg-pulse-glow {
|
|
509
|
+
box-shadow: none;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* ─── External Link Arrows (removed for Vercel-minimal design) ─── */
|
|
513
|
+
|
|
514
|
+
/* ─── Focus Ring Refinement ───────────────────────────────────── */
|
|
515
|
+
@layer base {
|
|
516
|
+
*:focus-visible {
|
|
517
|
+
outline: 2px solid var(--color-primary);
|
|
518
|
+
outline-offset: 2px;
|
|
519
|
+
border-radius: 2px;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* ─── Print Stylesheet ────────────────────────────────────────── */
|
|
524
|
+
/* Clean, readable output when readers print or save-as-PDF. */
|
|
525
|
+
@media print {
|
|
526
|
+
/* Hide interactive/nav chrome */
|
|
527
|
+
header,
|
|
528
|
+
nav,
|
|
529
|
+
aside,
|
|
530
|
+
footer,
|
|
531
|
+
.sg-copy-btn,
|
|
532
|
+
.sg-copy-btn-native,
|
|
533
|
+
[data-pagefind-ignore] {
|
|
534
|
+
display: none !important;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* Full-width content */
|
|
538
|
+
main {
|
|
539
|
+
margin: 0 !important;
|
|
540
|
+
padding: 0 !important;
|
|
541
|
+
max-width: 100% !important;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/* Ensure readability */
|
|
545
|
+
body {
|
|
546
|
+
font-size: 12pt;
|
|
547
|
+
line-height: 1.6;
|
|
548
|
+
color: #000;
|
|
549
|
+
background: #fff;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* Show link URLs */
|
|
553
|
+
.sg-content a[href^="http"]::after {
|
|
554
|
+
content: " (" attr(href) ")";
|
|
555
|
+
font-size: 0.8em;
|
|
556
|
+
color: #666;
|
|
557
|
+
background: none;
|
|
558
|
+
width: auto;
|
|
559
|
+
height: auto;
|
|
560
|
+
display: inline;
|
|
561
|
+
opacity: 1;
|
|
562
|
+
margin: 0;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/* Code blocks: readable borders instead of dark bg */
|
|
566
|
+
pre {
|
|
567
|
+
border: 1px solid #ccc;
|
|
568
|
+
background: #f8f8f8 !important;
|
|
569
|
+
page-break-inside: avoid;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* Avoid page breaks inside headings */
|
|
573
|
+
h1, h2, h3, h4 {
|
|
574
|
+
page-break-after: avoid;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/* Images: constrain to page */
|
|
578
|
+
img {
|
|
579
|
+
max-width: 100% !important;
|
|
580
|
+
page-break-inside: avoid;
|
|
581
|
+
}
|
|
582
|
+
}
|