@tenphi/starlight 0.6.1 → 0.7.0

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.
@@ -1,72 +1,45 @@
1
- import { useGlobalStyles } from "@tenphi/tasty";
1
+ import { useFontFace, useGlobalStyles } from "@tenphi/tasty";
2
+ import jetBrainsMonoLatin from "@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2?url";
3
+ import onestLatin from "@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url";
2
4
  import arrowLeftIcon from "../icons/arrow-left.svg?raw";
3
5
  import arrowRightIcon from "../icons/arrow-right.svg?raw";
4
6
  import chevronRightIcon from "../icons/chevron-right.svg?raw";
5
7
  import closeIcon from "../icons/close.svg?raw";
6
8
  import searchIcon from "../icons/search.svg?raw";
9
+ import { resolveComponentStyles } from "./component-styles.js";
7
10
  import { svgIconUrl } from "./svg-icon.js";
8
11
  import { configureCookbookStates } from "./tasty-states.js";
9
12
 
10
13
  configureCookbookStates();
11
14
 
12
- // These global rules bridge Cookbook tokens into markup owned by Astro,
13
- // Starlight, Expressive Code, and Pagefind. Cookbook-owned components use
14
- // tasty() wrappers; every style object remains visible to the Tasty linter.
15
+ // Starlight owns the document markup, while Tasty owns every emitted style and
16
+ // Glaze owns every color value. Cookbook-owned components use tasty() wrappers;
17
+ // every global style object remains visible to the Tasty linter.
15
18
  export default function GlobalStyles() {
19
+ useFontFace("Onest Variable", {
20
+ src: `url("${onestLatin}") format("woff2-variations")`,
21
+ fontWeight: "100 900",
22
+ fontDisplay: "swap",
23
+ });
24
+ useFontFace("JetBrains Mono Variable", {
25
+ src: `url("${jetBrainsMonoLatin}") format("woff2-variations")`,
26
+ fontWeight: "100 800",
27
+ fontDisplay: "swap",
28
+ });
29
+
16
30
  useGlobalStyles(":root", {
17
31
  colorScheme: "dark",
18
- "$sl-font": "$body-font-family",
19
- "$sl-font-mono": "$code-font-family",
20
- "$sl-line-height": "$body-line-height",
21
- "$sl-line-height-headings": "$heading-line-height",
22
- "$sl-text-body": "$body-font-size",
23
- "$sl-text-body-sm": "$small-font-size",
24
- "$sl-text-code": "$code-font-size",
25
- "$sl-text-code-sm": "$small-font-size",
26
- "$sl-text-h1": "$h1-font-size",
27
- "$sl-text-h2": "$h2-font-size",
28
- "$sl-text-h3": "$h3-font-size",
29
- "$sl-text-h4": "$h4-font-size",
30
- "$sl-text-h5": "$h5-font-size",
31
- "$sl-content-width": "$content-width",
32
- "$sl-sidebar-width": "$sidebar-width",
33
- "$sl-color-white": "#text",
34
- "$sl-color-gray-1": "#text",
35
- "$sl-color-gray-2": "#text-soft",
36
- "$sl-color-gray-3": "color-mix( in oklab, #text 66%, #surface )",
37
- "$sl-color-gray-4": "#border-strong",
38
- "$sl-color-gray-5": "#border",
39
- "$sl-color-gray-6": "#surface-2",
40
- "$sl-color-gray-7": "#surface-3",
41
- "$sl-color-black": "#surface",
42
- "$sl-color-text": "#text-soft",
43
- "$sl-color-text-accent": "#accent-text",
44
- "$sl-color-text-invert": "#accent-surface-text",
45
- "$sl-color-bg": "#surface",
46
- "$sl-color-bg-nav": "#surface",
47
- "$sl-color-bg-sidebar": "#surface",
48
- "$sl-color-bg-inline-code": "#surface-2",
49
- "$sl-color-bg-accent": "#accent-surface",
50
- "$sl-color-hairline-light": "#border",
51
- "$sl-color-hairline": "#border",
52
- "$sl-color-hairline-shade": "#border",
53
- "$sl-color-backdrop-overlay": "#overlay",
54
- "$sl-color-accent-low":
55
- "color-mix( in oklab, #accent-surface 12%, #surface )",
56
- "$sl-color-accent": "#accent-text",
57
- "$sl-color-accent-high": "#accent-text",
58
- "$sl-shadow-sm": "none",
59
- "$sl-shadow-md": "0 0.5rem 1.5rem #shadow",
60
- "$sl-shadow-lg": "0 1rem 3rem #shadow",
61
- "$sl-nav-height": "4.5rem",
62
- "$sl-nav-pad-x": "clamp(1.25rem, 2.5vw, 2rem)",
63
- "$sl-sidebar-pad-x": "1.5rem",
64
- "$sl-content-pad-x": "clamp(1.5rem, 4vw, 4rem)",
65
- "$sl-main-pad": "0 0 5rem",
32
+ "$docs-nav-height": "4.5rem",
33
+ "$docs-nav-pad-x": "clamp(1.25rem, 2.5vw, 2rem)",
34
+ "$docs-nav-gap": "0.75rem",
35
+ "$docs-sidebar-pad-x": "1.5rem",
36
+ "$docs-content-pad-x": "clamp(1.5rem, 4vw, 4rem)",
37
+ "$docs-menu-button-size": "2.5rem",
38
+ "$docs-mobile-toc-height": "0rem",
66
39
  });
67
40
 
68
41
  useGlobalStyles(":root:has(.td-top-tabs)", {
69
- "$sl-nav-height": "7rem",
42
+ "$docs-nav-height": "7rem",
70
43
  });
71
44
 
72
45
  useGlobalStyles(':root[data-theme="light"]', {
@@ -79,6 +52,62 @@ export default function GlobalStyles() {
79
52
  },
80
53
  });
81
54
 
55
+ useGlobalStyles("*, *::before, *::after", {
56
+ boxSizing: "border-box",
57
+ });
58
+
59
+ useGlobalStyles("html", {
60
+ minBlockSize: "100%",
61
+ scrollPaddingBlockStart:
62
+ "(1.5rem + $docs-nav-height + $docs-mobile-toc-height)",
63
+ });
64
+
65
+ useGlobalStyles("body", {
66
+ minInlineSize: "0",
67
+ minBlockSize: "100%",
68
+ margin: "0",
69
+ });
70
+
71
+ useGlobalStyles(":where(button, input, select, textarea)", {
72
+ font: "inherit",
73
+ });
74
+
75
+ useGlobalStyles(":where(button, summary, select)", {
76
+ cursor: "pointer",
77
+ });
78
+
79
+ useGlobalStyles(":where(img, picture, video, canvas, svg, iframe)", {
80
+ maxInlineSize: "100%",
81
+ });
82
+
83
+ useGlobalStyles(":where(img, picture, video, canvas, svg)", {
84
+ blockSize: "auto",
85
+ });
86
+
87
+ useGlobalStyles(":where([hidden], .sl-hidden)", {
88
+ hide: true,
89
+ });
90
+
91
+ useGlobalStyles(".md\\:sl-block", {
92
+ display: { "": "block", "@mobile": "none" },
93
+ });
94
+
95
+ useGlobalStyles(".md\\:sl-flex", {
96
+ display: { "": "flex", "@mobile": "none" },
97
+ });
98
+
99
+ useGlobalStyles(".sr-only", {
100
+ position: "absolute",
101
+ inlineSize: "1px",
102
+ blockSize: "1px",
103
+ padding: "0",
104
+ margin: "-1px",
105
+ overflow: "hidden",
106
+ clip: "rect(0, 0, 0, 0)",
107
+ whiteSpace: "nowrap",
108
+ border: "0",
109
+ });
110
+
82
111
  useGlobalStyles("html, body, button, input, select, textarea", {
83
112
  fontFamily: "$body-font-family",
84
113
  });
@@ -92,6 +121,180 @@ export default function GlobalStyles() {
92
121
  letterSpacing: "$body-letter-spacing",
93
122
  });
94
123
 
124
+ useGlobalStyles("a", {
125
+ color: "#accent-text",
126
+ });
127
+
128
+ useGlobalStyles(".page", {
129
+ display: "flex",
130
+ flow: "column",
131
+ minBlockSize: "100vh",
132
+ });
133
+
134
+ useGlobalStyles("body > .page > .header", {
135
+ position: "fixed",
136
+ zIndex: "10",
137
+ inset: "0 0 auto",
138
+ inlineSize: "100%",
139
+ blockSize: "$docs-nav-height",
140
+ padding: "0 $docs-nav-pad-x",
141
+ borderBlockEnd: "$border-width solid #border",
142
+ fill: "#surface",
143
+ });
144
+
145
+ useGlobalStyles(".sidebar-pane", {
146
+ visibility: { "": "visible", "@mobile": "hidden" },
147
+ position: "fixed",
148
+ zIndex: { "": "8", "@mobile": "12" },
149
+ insetBlockStart: "$docs-nav-height",
150
+ insetBlockEnd: "0",
151
+ insetInlineStart: "0",
152
+ inlineSize: { "": "$sidebar-width", "@mobile": "100%" },
153
+ overflowY: "auto",
154
+ scrollbarGutter: "stable",
155
+ fill: "#surface",
156
+ });
157
+
158
+ useGlobalStyles(
159
+ 'starlight-menu-button[aria-expanded="true"] ~ .sidebar-pane',
160
+ {
161
+ visibility: { "@mobile": "visible" },
162
+ },
163
+ );
164
+
165
+ useGlobalStyles(".sidebar-content", {
166
+ display: "flex",
167
+ flow: "column",
168
+ gap: "($gap * 2)",
169
+ minBlockSize: "100%",
170
+ padding: "($gap * 2) $docs-sidebar-pad-x ($gap * 6)",
171
+ });
172
+
173
+ useGlobalStyles("starlight-menu-button", {
174
+ display: { "": "none", "@mobile": "block" },
175
+ position: { "@mobile": "fixed" },
176
+ zIndex: { "@mobile": "11" },
177
+ insetBlockStart: {
178
+ "@mobile": "(($docs-nav-height - $docs-menu-button-size) / 2)",
179
+ },
180
+ insetInlineEnd: { "@mobile": "$docs-nav-pad-x" },
181
+ });
182
+
183
+ useGlobalStyles(".main-frame", {
184
+ minInlineSize: "0",
185
+ paddingBlockStart: "($docs-nav-height + $docs-mobile-toc-height)",
186
+ paddingInlineStart: "0",
187
+ });
188
+
189
+ useGlobalStyles("[data-has-sidebar] .main-frame", {
190
+ paddingInlineStart: { "": "$sidebar-width", "@mobile": "0" },
191
+ });
192
+
193
+ useGlobalStyles(".main-frame > .lg\\:sl-flex", {
194
+ display: { "": "flex", "@narrow-layout": "block" },
195
+ minInlineSize: "0",
196
+ });
197
+
198
+ useGlobalStyles(".main-pane", {
199
+ isolation: "isolate",
200
+ inlineSize: "100%",
201
+ minInlineSize: "0",
202
+ });
203
+
204
+ useGlobalStyles("[data-has-sidebar][data-has-toc] .main-pane", {
205
+ order: "1",
206
+ inlineSize: {
207
+ "": "min(calc(100% - $sidebar-width), calc($content-width + (100% - $content-width - $sidebar-width) / 2))",
208
+ "@narrow-layout": "100%",
209
+ },
210
+ });
211
+
212
+ useGlobalStyles(".right-sidebar-container", {
213
+ order: "2",
214
+ position: "relative",
215
+ inlineSize: {
216
+ "": "max($sidebar-width, calc($sidebar-width + (100% - $content-width - $sidebar-width) / 2))",
217
+ "@narrow-layout": "100%",
218
+ },
219
+ });
220
+
221
+ useGlobalStyles(".right-sidebar", {
222
+ position: { "": "fixed", "@narrow-layout": "static" },
223
+ insetBlockStart: { "": "0", "@narrow-layout": "auto" },
224
+ inlineSize: { "": "inherit", "@narrow-layout": "100%" },
225
+ blockSize: { "": "100vh", "@narrow-layout": "auto" },
226
+ paddingBlockStart: {
227
+ "": "$docs-nav-height",
228
+ "@narrow-layout": "0",
229
+ },
230
+ overflowY: { "": "auto", "@narrow-layout": "visible" },
231
+ scrollbarWidth: "none",
232
+ });
233
+
234
+ useGlobalStyles(".lg\\:sl-hidden", {
235
+ display: { "": "none", "@narrow-layout": "block" },
236
+ });
237
+
238
+ useGlobalStyles(".right-sidebar-panel", {
239
+ display: { "": "block", "@narrow-layout": "none" },
240
+ });
241
+
242
+ useGlobalStyles(".md\\:sl-hidden", {
243
+ display: { "": "none", "@mobile": "block" },
244
+ });
245
+
246
+ useGlobalStyles("main", {
247
+ padding: "0 0 5rem",
248
+ });
249
+
250
+ useGlobalStyles(".content-panel > .sl-container > * + *", {
251
+ marginBlockStart: "($gap * 3)",
252
+ });
253
+
254
+ useGlobalStyles(".content-panel > .sl-container", {
255
+ marginInlineStart: { "": "auto", "@narrow-layout": "0" },
256
+ marginInlineEnd: { "": "auto", "@narrow-layout": "0" },
257
+ });
258
+
259
+ useGlobalStyles(".sl-banner", {
260
+ padding: "($gap * 1.5) $docs-nav-pad-x",
261
+ color: "#accent-surface-text",
262
+ fill: "#accent-surface",
263
+ fontWeight: "$body-bold-font-weight",
264
+ lineHeight: "$heading-line-height",
265
+ textAlign: "center",
266
+ textWrap: "balance",
267
+ boxShadow: "none",
268
+ });
269
+
270
+ useGlobalStyles(".sl-banner a", {
271
+ color: "#accent-surface-text",
272
+ });
273
+
274
+ useGlobalStyles(".sl-skip-link", {
275
+ position: "fixed",
276
+ inset: "($gap * 1.5) auto auto ($gap * 1.5)",
277
+ inlineSize: "1px",
278
+ blockSize: "1px",
279
+ padding: "0",
280
+ overflow: "hidden",
281
+ clip: "rect(0, 0, 0, 0)",
282
+ });
283
+
284
+ useGlobalStyles(".sl-skip-link:focus", {
285
+ zIndex: "20",
286
+ inlineSize: "auto",
287
+ blockSize: "auto",
288
+ padding: "$gap ($gap * 2)",
289
+ overflow: "visible",
290
+ color: "#accent-surface-text",
291
+ fill: "#accent-surface",
292
+ clip: "auto",
293
+ radius: "$radius",
294
+ shadow: "0 1rem 3rem #shadow",
295
+ textDecoration: "none",
296
+ });
297
+
95
298
  useGlobalStyles(":where(h1, h2, h3, h4, h5, h6), .site-title", {
96
299
  color: "#text",
97
300
  fontFamily: "$heading-font-family",
@@ -148,136 +351,557 @@ export default function GlobalStyles() {
148
351
  },
149
352
  );
150
353
 
354
+ useGlobalStyles(":where(button, input, select, textarea)", {
355
+ minBlockSize: "$control-height",
356
+ radius: "$radius",
357
+ boxShadow: "none",
358
+ });
359
+
360
+ useGlobalStyles(
361
+ 'site-search button[data-open-modal], site-search dialog, .pagination-links a, a[aria-current="page"]',
362
+ { radius: "$radius" },
363
+ );
364
+
151
365
  useGlobalStyles(
152
- ":where(button, input, select, textarea):not(:where(.expressive-code *))",
366
+ '#starlight__sidebar a[aria-current="page"], #starlight__sidebar a[aria-current="page"]:hover, #starlight__sidebar a[aria-current="page"]:focus',
153
367
  {
154
- minBlockSize: "$control-height",
155
- radius: "$radius",
156
- boxShadow: "none",
368
+ color: "#accent-text",
369
+ fill: "#accent-surface-subtle",
157
370
  },
158
371
  );
159
372
 
160
- useGlobalStyles(".expressive-code", {
161
- "$ec-brdRad": "calc($card-radius - $border-width)",
162
- "$ec-brdWd": "$border-width",
163
- "$ec-brdCol": "#border",
373
+ useGlobalStyles("body > .page > .header, .sidebar-pane", {
374
+ fill: "#surface",
375
+ });
376
+
377
+ useGlobalStyles("#starlight__sidebar .sidebar-content", {
378
+ gap: "($gap * 3)",
379
+ paddingBlockStart: {
380
+ "": "($gap * 4)",
381
+ "@medium-layout": "($gap * 1.5)",
382
+ },
383
+ paddingBlockEnd: "($gap * 6)",
384
+ });
385
+
386
+ useGlobalStyles("#starlight__sidebar ul", {
387
+ padding: "0",
388
+ listStyle: "none",
389
+ });
390
+
391
+ useGlobalStyles("#starlight__sidebar li", {
392
+ overflowWrap: "anywhere",
393
+ });
394
+
395
+ useGlobalStyles("#starlight__sidebar .top-level > li + li", {
396
+ marginBlockStart: "($gap * 3)",
397
+ });
398
+
399
+ useGlobalStyles("#starlight__sidebar ul ul li", {
400
+ marginInlineStart: "($gap * 0.75)",
401
+ paddingInlineStart: "($gap * 0.75)",
402
+ borderInlineStart: "0",
164
403
  });
165
404
 
166
- useGlobalStyles(".expressive-code .copy button", {
405
+ useGlobalStyles("#starlight__sidebar :where(summary, a)", {
406
+ padding: "($gap * 0.8) ($gap * 1.25)",
407
+ color: "#text-soft",
408
+ lineHeight: "1.45",
167
409
  radius: "$radius",
168
- fill: "#surface-3",
169
- boxShadow: "none",
410
+ textDecoration: "none",
170
411
  });
171
412
 
172
- useGlobalStyles(".expressive-code .copy button::before", {
173
- borderColor: "#border",
174
- opacity: "1",
413
+ useGlobalStyles("#starlight__sidebar summary", {
414
+ display: "flex",
415
+ alignItems: "center",
416
+ justifyContent: "space-between",
417
+ cursor: "pointer",
418
+ userSelect: "none",
419
+ });
420
+
421
+ useGlobalStyles("#starlight__sidebar a", {
422
+ display: "block",
423
+ fill: "#surface",
175
424
  });
176
425
 
177
- useGlobalStyles(".expressive-code .copy button div", {
426
+ useGlobalStyles(
427
+ "#starlight__sidebar a:hover, #starlight__sidebar a:focus-visible, #starlight__sidebar summary:hover",
428
+ {
429
+ color: "#text",
430
+ fill: "#surface-2-hover",
431
+ },
432
+ );
433
+
434
+ useGlobalStyles("#starlight__sidebar summary::marker", {
178
435
  hide: true,
179
436
  });
180
437
 
438
+ useGlobalStyles("#starlight__sidebar a", {
439
+ fontSize: "0.9375rem",
440
+ });
441
+
442
+ useGlobalStyles("#starlight__sidebar .large", {
443
+ fontSize: "0.9375rem",
444
+ fontWeight: "$body-bold-font-weight",
445
+ color: "#text",
446
+ });
447
+
448
+ useGlobalStyles(".right-sidebar-panel", {
449
+ paddingBlockStart: "($gap * 5)",
450
+ paddingInlineStart: "$docs-sidebar-pad-x",
451
+ paddingInlineEnd: "$docs-sidebar-pad-x",
452
+ });
453
+
454
+ useGlobalStyles(".right-sidebar-panel h2", {
455
+ marginBlockEnd: "$gap",
456
+ color: "#text",
457
+ fontSize: "0.9375rem",
458
+ fontWeight: "$body-bold-font-weight",
459
+ lineHeight: "$heading-line-height",
460
+ });
461
+
462
+ useGlobalStyles(".right-sidebar-panel ul", {
463
+ display: "grid",
464
+ gap: "1px",
465
+ margin: "0",
466
+ padding: "0",
467
+ listStyle: "none",
468
+ });
469
+
470
+ useGlobalStyles(".right-sidebar-panel li", {
471
+ margin: "0",
472
+ padding: "0",
473
+ listStyle: "none",
474
+ });
475
+
476
+ useGlobalStyles(".right-sidebar-panel a", {
477
+ display: "block",
478
+ paddingBlockStart: "($gap * 0.5)",
479
+ paddingBlockEnd: "($gap * 0.5)",
480
+ color: "#text-muted",
481
+ fontSize: "$small-font-size",
482
+ lineHeight: "1.45",
483
+ textDecoration: "none",
484
+ overflowWrap: "anywhere",
485
+ });
486
+
487
+ useGlobalStyles(".right-sidebar-panel a:hover", {
488
+ color: "#text",
489
+ });
490
+
491
+ useGlobalStyles('.right-sidebar-panel a[aria-current="true"]', {
492
+ color: "#accent-text",
493
+ });
494
+
495
+ useGlobalStyles(".content-panel", {
496
+ padding: "($gap * 3) $docs-content-pad-x",
497
+ });
498
+
499
+ useGlobalStyles(".content-panel > .sl-container", {
500
+ maxInlineSize: "$content-width",
501
+ });
502
+
503
+ useGlobalStyles("main h1#_top", {
504
+ marginBlockStart: "($gap * 2)",
505
+ color: "#text",
506
+ preset: "h1",
507
+ });
508
+
509
+ useGlobalStyles("main > .content-panel:first-of-type", {
510
+ paddingBlockStart: "($gap * 3)",
511
+ paddingBlockEnd: "($gap * 2)",
512
+ });
513
+
514
+ useGlobalStyles("main > .content-panel:nth-of-type(2)", {
515
+ paddingBlockStart: "($gap * 2)",
516
+ });
517
+
518
+ useGlobalStyles(".sl-markdown-content", {
519
+ fontSize: "1.025rem",
520
+ });
521
+
181
522
  useGlobalStyles(
182
- ".expressive-code .copy button:hover, .expressive-code .copy button:focus-visible",
523
+ ".sl-markdown-content :where(p, ul, ol, dl, blockquote, pre, table, hr, details):not(:where(.not-content *))",
183
524
  {
184
- fill: "#surface-3-hover",
525
+ marginBlockStart: "0",
526
+ marginBlockEnd: "0",
185
527
  },
186
528
  );
187
529
 
188
- useGlobalStyles(".expressive-code .copy button:active", {
189
- fill: "#surface-3-pressed",
530
+ useGlobalStyles(
531
+ ".sl-markdown-content :not(a, strong, em, del, span, input, code, br) + :not(a, strong, em, del, span, input, code, br, :where(.not-content *))",
532
+ {
533
+ marginBlockStart: "($gap * 3)",
534
+ },
535
+ );
536
+
537
+ useGlobalStyles(
538
+ ".sl-markdown-content :not(h1, h2, h3, h4, h5, h6, .sl-heading-wrapper) + :where(h1, h2, h3, h4, h5, h6, .sl-heading-wrapper):not(:where(.not-content *))",
539
+ {
540
+ marginBlockStart: "1.5em",
541
+ },
542
+ );
543
+
544
+ useGlobalStyles(
545
+ ".sl-markdown-content :where(ul, ol):not(:where(.not-content *))",
546
+ {
547
+ paddingInlineStart: "1.5rem",
548
+ },
549
+ );
550
+
551
+ useGlobalStyles(
552
+ ".sl-markdown-content :where(li + li, dt + dt, dt + dd, dd + dd):not(:where(.not-content *))",
553
+ {
554
+ marginBlockStart: "($gap * 0.5)",
555
+ },
556
+ );
557
+
558
+ useGlobalStyles(".sl-markdown-content li:not(:where(.not-content *))", {
559
+ overflowWrap: "anywhere",
560
+ });
561
+
562
+ useGlobalStyles(".sl-markdown-content dt:not(:where(.not-content *))", {
563
+ fontWeight: "$body-bold-font-weight",
564
+ });
565
+
566
+ useGlobalStyles(".sl-markdown-content dd:not(:where(.not-content *))", {
567
+ paddingInlineStart: "($gap * 2)",
568
+ });
569
+
570
+ useGlobalStyles(".sl-markdown-content a:not(:where(.not-content *))", {
571
+ color: "#accent-text",
572
+ textUnderlineOffset: "0.15em",
573
+ });
574
+
575
+ useGlobalStyles(".sl-markdown-content a:hover:not(:where(.not-content *))", {
576
+ color: "#text",
190
577
  });
191
578
 
192
579
  useGlobalStyles(
193
- 'site-search button[data-open-modal], site-search dialog, .pagination-links a, a[aria-current="page"]',
194
- { radius: "$radius" },
580
+ ".sl-markdown-content code:not(:where(pre *, .not-content *))",
581
+ {
582
+ padding: "0.125rem 0.375rem",
583
+ color: "#text",
584
+ fill: "#surface-2",
585
+ fontSize: "$small-font-size",
586
+ radius: "($radius * 0.65)",
587
+ },
195
588
  );
196
589
 
590
+ useGlobalStyles(".sl-markdown-content pre:not(:where(.not-content *))", {
591
+ padding: "0.875rem 1rem",
592
+ overflowX: "auto",
593
+ color: "#syntax-text",
594
+ border: true,
595
+ fill: "#syntax-bg",
596
+ fontSize: "$code-font-size",
597
+ lineHeight: "$code-line-height",
598
+ radius: "$card-radius",
599
+ tabSize: "2",
600
+ });
601
+
602
+ useGlobalStyles(".sl-markdown-content pre code", {
603
+ padding: "0",
604
+ color: "inherit",
605
+ fill: "#clear",
606
+ fontFamily: "$code-font-family",
607
+ fontSize: "inherit",
608
+ lineHeight: "inherit",
609
+ });
610
+
197
611
  useGlobalStyles(
198
- '#starlight__sidebar a[aria-current="page"], #starlight__sidebar a[aria-current="page"]:hover, #starlight__sidebar a[aria-current="page"]:focus',
612
+ ".sl-markdown-content blockquote:not(:where(.not-content *))",
199
613
  {
200
- color: "#accent-text",
201
- fill: "color-mix( in oklab, #accent-surface 12%, #surface )",
614
+ paddingInlineStart: "($gap * 2)",
615
+ color: "#text-soft",
616
+ borderInlineStart: "$border-width solid #border-strong",
202
617
  },
203
618
  );
204
619
 
620
+ useGlobalStyles(".sl-markdown-content hr:not(:where(.not-content *))", {
621
+ border: "0",
622
+ borderBlockEnd: "$border-width solid #border",
623
+ });
624
+
625
+ useGlobalStyles(".sl-markdown-content details:not(:where(.not-content *))", {
626
+ paddingInlineStart: "($gap * 2)",
627
+ borderInlineStart: "2px solid #border",
628
+ });
629
+
205
630
  useGlobalStyles(
206
- "body > .page > .header, .sidebar-pane, .right-sidebar, .content-panel + .content-panel, mobile-starlight-toc :where(nav, summary)",
631
+ ".sl-markdown-content details:not([open]):hover:not(:where(.not-content *)), .sl-markdown-content details:has(> summary:hover):not(:where(.not-content *))",
207
632
  {
208
- border: "0",
633
+ borderColor: "#accent-text",
209
634
  },
210
635
  );
211
636
 
212
- useGlobalStyles("body > .page > .header, .sidebar-pane", {
213
- fill: "#surface",
637
+ useGlobalStyles(".sl-markdown-content summary:not(:where(.not-content *))", {
638
+ display: "block",
639
+ marginInlineStart: "-0.5rem",
640
+ paddingInlineStart: "0.5rem",
641
+ color: "#text",
642
+ fontWeight: "$body-bold-font-weight",
214
643
  });
215
644
 
216
- useGlobalStyles("#starlight__sidebar .sidebar-content", {
217
- gap: "($gap * 3)",
218
- paddingBlockStart: "($gap * 4)",
219
- paddingBlockEnd: "($gap * 6)",
645
+ useGlobalStyles(
646
+ ".sl-markdown-content details[open] > summary:not(:where(.not-content *))",
647
+ {
648
+ marginBlockEnd: "($gap * 2)",
649
+ },
650
+ );
651
+
652
+ useGlobalStyles(
653
+ ".sl-markdown-content summary:not(:where(.not-content *))::marker, .sl-markdown-content summary:not(:where(.not-content *))::-webkit-details-marker",
654
+ {
655
+ hide: true,
656
+ },
657
+ );
658
+
659
+ useGlobalStyles(
660
+ ".sl-markdown-content summary:not(:where(.not-content *))::before",
661
+ {
662
+ content: '""',
663
+ display: "inline-block",
664
+ inlineSize: "1.25rem",
665
+ blockSize: "1.25rem",
666
+ marginInlineEnd: "($gap * 0.5)",
667
+ verticalAlign: "middle",
668
+ fill: "#current",
669
+ mask: `url("${svgIconUrl(chevronRightIcon)}") center / contain no-repeat`,
670
+ transition: "rotate 120ms ease",
671
+ },
672
+ );
673
+
674
+ useGlobalStyles(
675
+ ".sl-markdown-content details[open] > summary:not(:where(.not-content *))::before",
676
+ {
677
+ rotate: "90deg",
678
+ },
679
+ );
680
+
681
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper", {
682
+ lineHeight: "$heading-line-height",
220
683
  });
221
684
 
222
- useGlobalStyles("#starlight__sidebar .top-level > li + li", {
223
- marginBlockStart: "($gap * 3)",
685
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h1", {
686
+ fontSize: "$h1-font-size",
224
687
  });
225
688
 
226
- useGlobalStyles("#starlight__sidebar ul ul li", {
227
- marginInlineStart: "($gap * 0.75)",
228
- paddingInlineStart: "($gap * 0.75)",
229
- borderInlineStart: "0",
689
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h2", {
690
+ fontSize: "$h2-font-size",
691
+ });
692
+
693
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h3", {
694
+ fontSize: "$h3-font-size",
695
+ });
696
+
697
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h4", {
698
+ fontSize: "$h4-font-size",
699
+ });
700
+
701
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h5", {
702
+ fontSize: "$h5-font-size",
703
+ });
704
+
705
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h6", {
706
+ fontSize: "$h6-font-size",
707
+ });
708
+
709
+ useGlobalStyles(".sl-markdown-content .sl-heading-wrapper > :first-child", {
710
+ display: "inline",
711
+ paddingInlineEnd: "1.1em",
712
+ });
713
+
714
+ useGlobalStyles(".sl-markdown-content .sl-anchor-link", {
715
+ position: "relative",
716
+ display: "inline-flex",
717
+ marginInlineStart: "-0.85em",
718
+ color: "#text-muted",
719
+ userSelect: "none",
720
+ textDecoration: "none",
721
+ });
722
+
723
+ useGlobalStyles(".sl-markdown-content .sl-anchor-link:hover", {
724
+ color: "#accent-text",
725
+ });
726
+
727
+ useGlobalStyles(".sl-markdown-content .sl-anchor-icon > svg", {
728
+ display: "inline",
729
+ inlineSize: "0.8275em",
730
+ verticalAlign: "middle",
731
+ });
732
+
733
+ useGlobalStyles(".starlight-aside", {
734
+ padding: "($gap * 2) ($gap * 2.5)",
735
+ color: "#text-soft",
736
+ border: true,
737
+ radius: "$card-radius",
738
+ fill: "#surface-2",
739
+ });
740
+
741
+ useGlobalStyles(".starlight-aside__title", {
742
+ display: "flex",
743
+ alignItems: "center",
744
+ gap: "$gap",
745
+ margin: "0 0 $gap",
746
+ color: "#text",
747
+ fontWeight: "$body-bold-font-weight",
748
+ });
749
+
750
+ useGlobalStyles(".starlight-aside__icon", {
751
+ flexShrink: "0",
752
+ color: "#accent-text",
753
+ });
754
+
755
+ useGlobalStyles(".starlight-aside__content > :first-child", {
756
+ marginBlockStart: "0",
757
+ });
758
+
759
+ useGlobalStyles(".card", {
760
+ display: "flex",
761
+ flow: "column",
762
+ gap: "clamp(0.5rem, calc(0.125rem + 1vw), 1rem)",
763
+ padding: "clamp(1rem, calc(0.125rem + 3vw), 2.5rem)",
764
+ border: true,
765
+ radius: "$card-radius",
766
+ fill: "#surface-2",
767
+ });
768
+
769
+ useGlobalStyles(".card > .title", {
770
+ display: "flex",
771
+ alignItems: "center",
772
+ gap: "($gap * 2)",
773
+ margin: "0",
774
+ color: "#text",
775
+ preset: "h4 / strong",
776
+ });
777
+
778
+ useGlobalStyles(".sl-link-card", {
779
+ position: "relative",
780
+ display: "grid",
781
+ gridColumns: "1fr auto",
782
+ gap: "$gap",
783
+ padding: "($gap * 2)",
784
+ border: true,
785
+ radius: "$card-radius",
786
+ fill: "#surface-2",
230
787
  });
231
788
 
232
- useGlobalStyles("#starlight__sidebar :where(summary, a)", {
233
- padding: "($gap * 0.8) ($gap * 1.25)",
234
- lineHeight: "1.45",
789
+ useGlobalStyles(".sl-link-card:hover", {
790
+ fill: "#surface-2-hover",
235
791
  });
236
792
 
237
- useGlobalStyles("#starlight__sidebar a", {
238
- fontSize: "0.9375rem",
793
+ useGlobalStyles(".sl-link-card .stack", {
794
+ display: "flex",
795
+ flow: "column",
796
+ gap: "$gap",
239
797
  });
240
798
 
241
- useGlobalStyles("#starlight__sidebar .large", {
242
- fontSize: "0.9375rem",
799
+ useGlobalStyles(".sl-link-card a", {
800
+ color: "#text",
243
801
  fontWeight: "$body-bold-font-weight",
802
+ textDecoration: "none",
244
803
  });
245
804
 
246
- useGlobalStyles(".right-sidebar-panel", {
247
- paddingBlockStart: "($gap * 5)",
805
+ useGlobalStyles(".sl-link-card a::before", {
806
+ content: '""',
807
+ position: "absolute",
808
+ inset: "0",
248
809
  });
249
810
 
250
- useGlobalStyles(".right-sidebar-panel h2", {
251
- fontSize: "0.9375rem",
811
+ useGlobalStyles(".sl-link-card .description, .sl-link-card .icon", {
812
+ color: "#text-muted",
252
813
  });
253
814
 
254
- useGlobalStyles(".right-sidebar-panel a", {
255
- paddingBlockStart: "($gap * 0.5)",
256
- paddingBlockEnd: "($gap * 0.5)",
815
+ useGlobalStyles(".sl-badge", {
816
+ display: "inline-block",
817
+ padding: "0.175rem 0.35rem",
818
+ color: "#text-soft",
819
+ border: true,
820
+ radius: "$radius",
821
+ fill: "#surface-3",
822
+ fontFamily: "$code-font-family",
257
823
  fontSize: "$small-font-size",
258
- lineHeight: "1.45",
824
+ lineHeight: "1",
825
+ overflowWrap: "anywhere",
259
826
  });
260
827
 
261
- useGlobalStyles("main > .content-panel:first-of-type", {
262
- paddingBlockStart: "($gap * 3)",
263
- paddingBlockEnd: "($gap * 2)",
828
+ useGlobalStyles(".sl-steps", {
829
+ listStyle: "none",
830
+ counterReset: "steps-counter",
831
+ paddingInlineStart: "0",
264
832
  });
265
833
 
266
- useGlobalStyles("main > .content-panel:nth-of-type(2)", {
267
- paddingBlockStart: "($gap * 2)",
834
+ useGlobalStyles(".sl-steps > li", {
835
+ counterIncrement: "steps-counter",
836
+ position: "relative",
837
+ minBlockSize: "2rem",
838
+ paddingInlineStart: "3rem",
839
+ paddingBlockEnd: "1px",
268
840
  });
269
841
 
270
- useGlobalStyles(".sl-markdown-content", {
271
- fontSize: "1.025rem",
842
+ useGlobalStyles(".sl-steps > li::before", {
843
+ content: "counter(steps-counter)",
844
+ position: "absolute",
845
+ insetBlockStart: "0",
846
+ insetInlineStart: "0",
847
+ display: "grid",
848
+ placeItems: "center",
849
+ inlineSize: "2rem",
850
+ blockSize: "2rem",
851
+ color: "#text",
852
+ border: true,
853
+ radius: "999px",
854
+ fill: "#surface-3",
855
+ fontSize: "$small-font-size",
856
+ fontWeight: "$body-bold-font-weight",
857
+ });
858
+
859
+ useGlobalStyles(".sl-steps > li::after", {
860
+ content: '""',
861
+ position: "absolute",
862
+ insetBlock: "2.5rem $gap",
863
+ insetInlineStart: "(1rem - ($border-width / 2))",
864
+ inlineSize: "$border-width",
865
+ fill: "#border",
272
866
  });
273
867
 
274
868
  useGlobalStyles("site-search button[data-open-modal]", {
869
+ display: "flex",
870
+ alignItems: "center",
871
+ gap: "$gap",
872
+ inlineSize: "100%",
873
+ maxInlineSize: "22rem",
874
+ blockSize: "$control-height",
875
+ paddingInlineStart: "($gap * 1.5)",
876
+ paddingInlineEnd: "$gap",
877
+ color: "#text-soft",
275
878
  border: true,
276
879
  fill: "#surface",
880
+ fontSize: "$small-font-size",
277
881
  boxShadow: "none",
882
+ cursor: "pointer",
278
883
  transition: "color 120ms ease, background-color 120ms ease",
279
884
  });
280
885
 
886
+ useGlobalStyles("site-search", {
887
+ display: "contents",
888
+ });
889
+
890
+ useGlobalStyles("site-search button[data-open-modal] > :last-child", {
891
+ marginInlineStart: "auto",
892
+ });
893
+
894
+ useGlobalStyles("site-search button[data-open-modal] > kbd", {
895
+ display: { "": "flex", "@mobile": "none" },
896
+ gap: "0.25em",
897
+ paddingInlineStart: "0.375rem",
898
+ paddingInlineEnd: "0.375rem",
899
+ fill: "#surface-3",
900
+ fontFamily: "$body-font-family",
901
+ fontSize: "0.75rem",
902
+ radius: "($radius * 0.75)",
903
+ });
904
+
281
905
  useGlobalStyles("site-search button[data-open-modal]:hover", {
282
906
  borderColor: "#border",
283
907
  fill: "#surface-2-hover",
@@ -288,11 +912,33 @@ export default function GlobalStyles() {
288
912
  });
289
913
 
290
914
  useGlobalStyles(".pagination-links a", {
291
- borderWidth: "$border-width",
292
- borderColor: "#border",
915
+ display: "flex",
916
+ alignItems: "center",
917
+ justifyContent: "flex-start",
918
+ gap: "$gap",
919
+ inlineSize: "100%",
920
+ padding: "($gap * 2)",
921
+ border: "$border-width solid #border",
922
+ color: "#text-soft",
293
923
  fill: "#surface-2",
294
924
  boxShadow: "none",
295
925
  transition: "color 120ms ease, background-color 120ms ease",
926
+ textDecoration: "none",
927
+ overflowWrap: "anywhere",
928
+ });
929
+
930
+ useGlobalStyles('.pagination-links a[rel="next"]', {
931
+ justifyContent: "flex-start",
932
+ textAlign: "end",
933
+ });
934
+
935
+ useGlobalStyles('.pagination-links a[rel="next"]::before', {
936
+ order: "1",
937
+ });
938
+
939
+ useGlobalStyles('.pagination-links a[rel="next"] > span', {
940
+ marginInlineStart: "auto",
941
+ textAlign: "end",
296
942
  });
297
943
 
298
944
  useGlobalStyles(".pagination-links a:hover", {
@@ -304,7 +950,82 @@ export default function GlobalStyles() {
304
950
  fill: "#surface-2-pressed",
305
951
  });
306
952
 
953
+ useGlobalStyles(".pagination-links .link-title", {
954
+ color: "#text",
955
+ preset: "h5 / strong",
956
+ });
957
+
958
+ useGlobalStyles("main footer", {
959
+ display: "flex",
960
+ flow: "column",
961
+ gap: "($gap * 3)",
962
+ });
963
+
964
+ useGlobalStyles("main footer .meta", {
965
+ display: "flex",
966
+ flow: "row wrap",
967
+ justifyContent: "space-between",
968
+ gap: "($gap * 1.5) ($gap * 6)",
969
+ marginBlockStart: "($gap * 6)",
970
+ color: "#text-muted",
971
+ preset: "small",
972
+ });
973
+
974
+ useGlobalStyles("main footer .meta a, main footer .kudos", {
975
+ display: "flex",
976
+ alignItems: "center",
977
+ gap: "$gap",
978
+ color: "#text-muted",
979
+ textDecoration: "none",
980
+ });
981
+
982
+ useGlobalStyles("main footer .meta a:hover, main footer .kudos:hover", {
983
+ color: "#text",
984
+ });
985
+
986
+ useGlobalStyles("main footer .kudos", {
987
+ margin: "($gap * 3) auto",
988
+ preset: "small",
989
+ });
990
+
991
+ useGlobalStyles("starlight-lang-select label", {
992
+ position: "relative",
993
+ display: "flex",
994
+ alignItems: "center",
995
+ gap: "($gap * 0.5)",
996
+ color: "#text-soft",
997
+ });
998
+
999
+ useGlobalStyles("starlight-lang-select label:hover", {
1000
+ color: "#text",
1001
+ });
1002
+
1003
+ useGlobalStyles("starlight-lang-select select", {
1004
+ color: "#text-soft",
1005
+ border: "0",
1006
+ fill: "#clear",
1007
+ cursor: "pointer",
1008
+ });
1009
+
1010
+ useGlobalStyles("starlight-lang-select option", {
1011
+ color: "#text",
1012
+ fill: "#surface-2",
1013
+ });
1014
+
1015
+ useGlobalStyles(".td-header__social a, .td-mobile-preferences__social a", {
1016
+ color: "#accent-text",
1017
+ });
1018
+
1019
+ useGlobalStyles(
1020
+ ".td-header__social a:hover, .td-mobile-preferences__social a:hover",
1021
+ {
1022
+ color: "#text",
1023
+ },
1024
+ );
1025
+
307
1026
  useGlobalStyles("main .pagination-links", {
1027
+ display: "grid",
1028
+ gap: "($gap * 2)",
308
1029
  gridTemplateColumns: {
309
1030
  "": "repeat(2, minmax(0, 1fr))",
310
1031
  "@small": "1fr",
@@ -381,21 +1102,133 @@ export default function GlobalStyles() {
381
1102
  );
382
1103
 
383
1104
  useGlobalStyles("site-search dialog", {
1105
+ inlineSize: { "": "90%", "@mobile": "100%" },
1106
+ maxInlineSize: { "": "40rem", "@mobile": "100%" },
1107
+ blockSize: { "": "max-content", "@mobile": "100%" },
1108
+ maxBlockSize: { "": "(100% - 8rem)", "@mobile": "100%" },
1109
+ minBlockSize: { "": "15rem", "@mobile": "100%" },
1110
+ margin: { "": "4rem auto auto", "@mobile": "0" },
1111
+ padding: "0",
1112
+ color: "#text",
1113
+ border: true,
1114
+ radius: { "": "$card-radius", "@mobile": "0" },
384
1115
  fill: "#surface",
1116
+ shadow: "0 1rem 3rem #shadow",
1117
+ });
1118
+
1119
+ useGlobalStyles("site-search dialog[open]", {
1120
+ display: "flex",
1121
+ });
1122
+
1123
+ useGlobalStyles("site-search dialog::backdrop", {
1124
+ fill: "#overlay",
1125
+ backdropFilter: "blur(0.25rem)",
1126
+ });
1127
+
1128
+ useGlobalStyles("site-search .dialog-frame", {
1129
+ position: "relative",
1130
+ display: "flex",
1131
+ flow: "column",
1132
+ flexGrow: "1",
1133
+ gap: "($gap * 2)",
1134
+ padding: { "": "($gap * 3)", "@mobile": "($gap * 2)" },
1135
+ overflow: "auto",
1136
+ });
1137
+
1138
+ useGlobalStyles("site-search .search-container", {
1139
+ inlineSize: "100%",
1140
+ paddingBlockStart: { "": "0", "@mobile": "4rem" },
385
1141
  });
386
1142
 
387
1143
  useGlobalStyles("site-search button[data-close-modal]", {
1144
+ position: "absolute",
1145
+ zIndex: "1",
1146
+ insetBlockStart: "($gap * 2)",
1147
+ insetInlineEnd: "($gap * 2)",
1148
+ display: { "": "none", "@mobile": "flex" },
1149
+ alignItems: "center",
1150
+ justifyContent: "center",
388
1151
  gap: "0.375rem",
1152
+ blockSize: "3rem",
1153
+ minBlockSize: "3rem",
389
1154
  paddingInlineStart: "0.625rem",
390
1155
  paddingInlineEnd: "0.625rem",
391
- color: "#text",
1156
+ color: "#text-soft",
392
1157
  border: true,
1158
+ borderColor: "#border",
393
1159
  radius: "$radius",
1160
+ fill: "#surface-3",
1161
+ fontSize: "$small-font-size",
1162
+ fontWeight: "$body-bold-font-weight",
1163
+ boxShadow: "none",
1164
+ cursor: "pointer",
1165
+ transition: "color 120ms ease, background-color 120ms ease",
1166
+ });
1167
+
1168
+ useGlobalStyles("site-search button[data-close-modal]:hover", {
1169
+ color: "#text",
1170
+ fill: "#surface-3-hover",
1171
+ });
1172
+
1173
+ useGlobalStyles("site-search button[data-close-modal]:active", {
1174
+ color: "#text",
1175
+ fill: "#surface-3-pressed",
394
1176
  });
395
1177
 
396
1178
  useGlobalStyles("#starlight__search", {
1179
+ "$pagefind-ui-primary": "#accent-text",
1180
+ "$pagefind-ui-text": "#text-soft",
1181
+ "$pagefind-ui-font": "$body-font-family",
397
1182
  "$pagefind-ui-background": "#surface",
398
1183
  "$pagefind-ui-border": "#border",
1184
+ "$pagefind-ui-border-width": "$border-width",
1185
+ "$pagefind-ui-tag": "#surface-3",
1186
+ });
1187
+
1188
+ useGlobalStyles("#starlight__search .pagefind-ui__form", {
1189
+ position: "relative",
1190
+ });
1191
+
1192
+ useGlobalStyles("#starlight__search .pagefind-ui__search-input", {
1193
+ inlineSize: "100%",
1194
+ minBlockSize: "3rem",
1195
+ paddingInlineStart: "2.75rem",
1196
+ paddingInlineEnd: "2.75rem",
1197
+ color: "#text",
1198
+ border: true,
1199
+ radius: "$radius",
1200
+ fill: "#surface",
1201
+ });
1202
+
1203
+ useGlobalStyles("#starlight__search .pagefind-ui__search-clear", {
1204
+ position: "absolute",
1205
+ insetBlockStart: "0",
1206
+ insetInlineEnd: "0",
1207
+ inlineSize: "3rem",
1208
+ blockSize: "3rem",
1209
+ padding: "0",
1210
+ color: "#text-soft",
1211
+ border: "0",
1212
+ fill: "#clear",
1213
+ });
1214
+
1215
+ useGlobalStyles("#starlight__search .pagefind-ui__results-area", {
1216
+ marginBlockStart: "($gap * 3)",
1217
+ });
1218
+
1219
+ useGlobalStyles("#starlight__search .pagefind-ui__result", {
1220
+ paddingBlockStart: "($gap * 2)",
1221
+ paddingBlockEnd: "($gap * 2)",
1222
+ borderBlockStart: "$border-width solid #border",
1223
+ });
1224
+
1225
+ useGlobalStyles("#starlight__search .pagefind-ui__result-link", {
1226
+ color: "#text",
1227
+ fontWeight: "$body-bold-font-weight",
1228
+ });
1229
+
1230
+ useGlobalStyles("[data-search-modal-open]", {
1231
+ overflow: "hidden",
399
1232
  });
400
1233
 
401
1234
  useGlobalStyles("#starlight__search .pagefind-ui__search-input", {
@@ -405,15 +1238,43 @@ export default function GlobalStyles() {
405
1238
  });
406
1239
 
407
1240
  useGlobalStyles("#starlight__search .pagefind-ui__form::before", {
1241
+ content: '""',
1242
+ position: "absolute",
1243
+ zIndex: "1",
1244
+ insetBlockStart: "1rem",
1245
+ insetInlineStart: "1rem",
1246
+ display: "block",
408
1247
  inlineSize: "1rem",
409
1248
  blockSize: "1rem",
1249
+ fill: "#text-soft",
410
1250
  mask: `url("${svgIconUrl(searchIcon)}") center / contain no-repeat`,
1251
+ pointerEvents: "none",
411
1252
  });
412
1253
 
413
1254
  useGlobalStyles("#starlight__search .pagefind-ui__search-clear::before", {
1255
+ content: '""',
1256
+ display: "block",
1257
+ inlineSize: "1rem",
1258
+ blockSize: "1rem",
1259
+ fill: "#current",
414
1260
  mask: `url("${svgIconUrl(closeIcon)}") center / 1rem no-repeat`,
415
1261
  });
416
1262
 
1263
+ useGlobalStyles("#starlight__search .pagefind-ui__search-clear", {
1264
+ display: "flex",
1265
+ alignItems: "center",
1266
+ justifyContent: "center",
1267
+ fontSize: "0",
1268
+ cursor: "pointer",
1269
+ });
1270
+
1271
+ useGlobalStyles(
1272
+ "#starlight__search .pagefind-ui__search-clear.pagefind-ui__suppressed",
1273
+ {
1274
+ display: "none",
1275
+ },
1276
+ );
1277
+
417
1278
  useGlobalStyles(
418
1279
  "starlight-menu-button button, mobile-starlight-toc .toggle",
419
1280
  {
@@ -426,10 +1287,11 @@ export default function GlobalStyles() {
426
1287
  );
427
1288
 
428
1289
  useGlobalStyles("starlight-menu-button button", {
1290
+ display: "flex",
429
1291
  alignItems: "center",
430
1292
  justifyContent: "center",
431
- inlineSize: "$sl-menu-button-size",
432
- blockSize: "$sl-menu-button-size",
1293
+ inlineSize: "$docs-menu-button-size",
1294
+ blockSize: "$docs-menu-button-size",
433
1295
  minBlockSize: "0",
434
1296
  padding: "0",
435
1297
  color: "#text-soft",
@@ -441,6 +1303,17 @@ export default function GlobalStyles() {
441
1303
  blockSize: "1.125rem",
442
1304
  });
443
1305
 
1306
+ useGlobalStyles(
1307
+ 'starlight-menu-button[aria-expanded="true"] .open-menu, starlight-menu-button:not([aria-expanded="true"]) .close-menu',
1308
+ {
1309
+ hide: true,
1310
+ },
1311
+ );
1312
+
1313
+ useGlobalStyles("[data-mobile-menu-expanded]", {
1314
+ overflow: { "": "auto", "@mobile": "hidden" },
1315
+ });
1316
+
444
1317
  useGlobalStyles(
445
1318
  "starlight-menu-button button:hover, mobile-starlight-toc .toggle:hover, mobile-starlight-toc details[open] .toggle",
446
1319
  {
@@ -462,15 +1335,20 @@ export default function GlobalStyles() {
462
1335
 
463
1336
  useGlobalStyles("mobile-starlight-toc summary", {
464
1337
  position: "relative",
1338
+ display: "flex",
465
1339
  alignItems: "center",
1340
+ justifyContent: "flex-start",
466
1341
  gap: "$gap",
467
- paddingInlineStart: "$sl-content-pad-x",
468
- paddingInlineEnd: "$sl-content-pad-x",
1342
+ paddingInlineStart: "$docs-content-pad-x",
1343
+ paddingInlineEnd: "$docs-content-pad-x",
469
1344
  });
470
1345
 
471
1346
  useGlobalStyles(
472
1347
  "mobile-starlight-toc .toggle, mobile-starlight-toc .toggle:hover, mobile-starlight-toc details[open] .toggle, mobile-starlight-toc .toggle:active",
473
1348
  {
1349
+ display: "inline-flex",
1350
+ alignItems: "center",
1351
+ flexShrink: "0",
474
1352
  gap: "$gap",
475
1353
  margin: "0",
476
1354
  padding: "0",
@@ -493,18 +1371,18 @@ export default function GlobalStyles() {
493
1371
  );
494
1372
 
495
1373
  useGlobalStyles("mobile-starlight-toc summary .toggle", {
496
- gap: "$gap",
497
- margin: "0",
1374
+ whiteSpace: "nowrap",
498
1375
  });
499
1376
 
500
1377
  useGlobalStyles("mobile-starlight-toc .dropdown", {
501
1378
  position: "absolute",
502
1379
  inset: "100% top",
503
- insetInlineStart: "$sl-content-pad-x",
1380
+ insetInlineStart: "$docs-content-pad-x",
504
1381
  zIndex: "1",
505
1382
  display: "block",
506
- inlineSize: "min(22rem, (100% - ($sl-content-pad-x * 2)))",
507
- maxBlockSize: "min(24rem, (100vh - ($sl-mobile-toc-height + ($gap * 4))))",
1383
+ inlineSize: "min(22rem, (100% - ($docs-content-pad-x * 2)))",
1384
+ maxBlockSize:
1385
+ "min(24rem, (100vh - ($docs-mobile-toc-height + ($gap * 4))))",
508
1386
  margin: "$gap 0 0",
509
1387
  padding: "4px",
510
1388
  overflow: "auto",
@@ -515,9 +1393,42 @@ export default function GlobalStyles() {
515
1393
  shadow: "0 0.75rem 2rem #shadow",
516
1394
  });
517
1395
 
1396
+ useGlobalStyles("mobile-starlight-toc nav", {
1397
+ position: "fixed",
1398
+ zIndex: "9",
1399
+ insetBlockStart: "($docs-nav-height - $border-width)",
1400
+ insetInlineStart: {
1401
+ "": "0",
1402
+ "@medium-layout": "$sidebar-width",
1403
+ },
1404
+ insetInlineEnd: "0",
1405
+ fill: "#surface",
1406
+ });
1407
+
1408
+ useGlobalStyles("mobile-starlight-toc details", {
1409
+ position: "relative",
1410
+ });
1411
+
1412
+ useGlobalStyles("mobile-starlight-toc .display-current", {
1413
+ minInlineSize: "0",
1414
+ overflow: "hidden",
1415
+ color: "#text",
1416
+ textOverflow: "ellipsis",
1417
+ whiteSpace: "nowrap",
1418
+ });
1419
+
518
1420
  useGlobalStyles("mobile-starlight-toc .dropdown .isMobile", {
519
1421
  display: "grid",
520
1422
  gap: "1px",
1423
+ margin: "0",
1424
+ padding: "0",
1425
+ listStyle: "none",
1426
+ });
1427
+
1428
+ useGlobalStyles("mobile-starlight-toc .dropdown .isMobile > li", {
1429
+ margin: "0",
1430
+ padding: "0",
1431
+ listStyle: "none",
521
1432
  });
522
1433
 
523
1434
  useGlobalStyles("mobile-starlight-toc .dropdown .isMobile a", {
@@ -540,7 +1451,7 @@ export default function GlobalStyles() {
540
1451
  'mobile-starlight-toc .dropdown .isMobile a[aria-current="true"]',
541
1452
  {
542
1453
  color: "#accent-text",
543
- fill: "color-mix(in oklab, #accent-surface 12%, #surface-2)",
1454
+ fill: "#accent-surface-2-subtle",
544
1455
  },
545
1456
  );
546
1457
 
@@ -558,57 +1469,67 @@ export default function GlobalStyles() {
558
1469
  },
559
1470
  );
560
1471
 
561
- useGlobalStyles(".sl-markdown-content :where(table, blockquote, details)", {
562
- borderColor: "#border",
563
- });
564
-
565
- useGlobalStyles(".sl-markdown-content table", {
566
- inlineSize: "100%",
567
- borderCollapse: "separate",
568
- borderSpacing: "0",
569
- overflow: "auto",
570
- color: "#text-soft",
571
- fontSize: "$small-font-size",
572
- lineHeight: "$small-line-height",
573
- border: true,
574
- radius: "$card-radius",
575
- scrollbarWidth: "thin",
576
- });
577
-
578
- useGlobalStyles(".sl-markdown-content :where(th, td)", {
579
- padding: "($gap * 1.5) ($gap * 2)",
580
- verticalAlign: "top",
1472
+ useGlobalStyles(".sl-markdown-content :where(blockquote, details)", {
581
1473
  borderColor: "#border",
582
1474
  });
583
1475
 
584
- useGlobalStyles(".sl-markdown-content :where(th, td):first-child", {
585
- paddingInlineStart: "($gap * 2)",
586
- });
587
-
588
- useGlobalStyles(".sl-markdown-content :where(th, td):last-child", {
589
- paddingInlineEnd: "($gap * 2)",
590
- });
591
-
592
- useGlobalStyles(".sl-markdown-content tbody tr:last-child td", {
593
- borderBlockEnd: "0",
594
- });
595
-
596
- useGlobalStyles(".sl-markdown-content th", {
597
- color: "#text",
598
- fill: "#surface-2",
599
- });
1476
+ useGlobalStyles(
1477
+ ".sl-markdown-content",
1478
+ resolveComponentStyles("MarkdownTable", {
1479
+ Table: {
1480
+ $: "table",
1481
+ inlineSize: "100%",
1482
+ borderCollapse: "separate",
1483
+ borderSpacing: "0",
1484
+ overflow: "auto",
1485
+ color: "#text-soft",
1486
+ fontSize: "$small-font-size",
1487
+ lineHeight: "$small-line-height",
1488
+ border: true,
1489
+ borderColor: "#border",
1490
+ radius: "$card-radius",
1491
+ scrollbarWidth: "thin",
1492
+ },
1493
+ Cell: {
1494
+ $: "th, td",
1495
+ padding: "($gap * 1.5) ($gap * 2)",
1496
+ verticalAlign: "top",
1497
+ borderColor: "#border",
1498
+ },
1499
+ LastBodyRowCell: {
1500
+ $: "tbody td",
1501
+ borderBlockEnd: {
1502
+ "@own(:is(tbody tr:last-child > td))": "0",
1503
+ },
1504
+ },
1505
+ HeaderCell: {
1506
+ $: "th",
1507
+ color: "#text",
1508
+ fill: "#surface-2",
1509
+ textAlign: "start",
1510
+ radius: {
1511
+ "@own(:is(thead:first-child tr:first-child > th) & :first-child & !:last-child)":
1512
+ "($card-radius - $border-width) top-left",
1513
+ "@own(:is(thead:first-child tr:first-child > th) & !:first-child & :last-child)":
1514
+ "($card-radius - $border-width) top-right",
1515
+ "@own(:is(thead:first-child tr:first-child > th) & :first-child & :last-child)":
1516
+ "($card-radius - $border-width) top",
1517
+ },
1518
+ },
1519
+ }),
1520
+ );
600
1521
 
601
1522
  useGlobalStyles(":root, :root:has(.td-top-tabs)", {
602
- "$sl-nav-height": {
1523
+ "$docs-nav-height": {
603
1524
  "@mobile": "3.5rem",
604
1525
  },
605
- "$sl-nav-pad-x": {
1526
+ "$docs-nav-pad-x": {
606
1527
  "@mobile": "1rem",
607
1528
  },
608
- "$sl-nav-gap": {
1529
+ "$docs-nav-gap": {
609
1530
  "@mobile": "0.5rem",
610
1531
  },
611
- "$sl-menu-button-size": {
1532
+ "$docs-menu-button-size": {
612
1533
  "@mobile": "2.25rem",
613
1534
  },
614
1535
  });
@@ -620,10 +1541,10 @@ export default function GlobalStyles() {
620
1541
  "@mobile": "center",
621
1542
  },
622
1543
  inlineSize: {
623
- "@mobile": "$sl-menu-button-size",
1544
+ "@mobile": "$docs-menu-button-size",
624
1545
  },
625
1546
  blockSize: {
626
- "@mobile": "$sl-menu-button-size",
1547
+ "@mobile": "$docs-menu-button-size",
627
1548
  },
628
1549
  minBlockSize: {
629
1550
  "@mobile": "0",
@@ -674,7 +1595,7 @@ export default function GlobalStyles() {
674
1595
  });
675
1596
 
676
1597
  useGlobalStyles(":root[data-has-toc]", {
677
- "$sl-mobile-toc-height": {
1598
+ "$docs-mobile-toc-height": {
678
1599
  "@narrow-layout": "2.5rem",
679
1600
  },
680
1601
  });
@@ -701,7 +1622,7 @@ export default function GlobalStyles() {
701
1622
  });
702
1623
 
703
1624
  useGlobalStyles(":root[data-has-toc], :root[data-has-toc]", {
704
- "$sl-mobile-toc-height": {
1625
+ "$docs-mobile-toc-height": {
705
1626
  "@medium-layout": "calc(2.5rem + ($gap * 3))",
706
1627
  },
707
1628
  });