@tenphi/starlight 0.10.0 → 0.11.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.
@@ -3,8 +3,10 @@ import jetBrainsMonoLatin from "@fontsource-variable/jetbrains-mono/files/jetbra
3
3
  import onestLatin from "@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url";
4
4
  import arrowLeftIcon from "../icons/arrow-left.svg?raw";
5
5
  import arrowRightIcon from "../icons/arrow-right.svg?raw";
6
+ import checkIcon from "../icons/check.svg?raw";
6
7
  import chevronRightIcon from "../icons/chevron-right.svg?raw";
7
8
  import closeIcon from "../icons/close.svg?raw";
9
+ import copyIcon from "../icons/copy.svg?raw";
8
10
  import searchIcon from "../icons/search.svg?raw";
9
11
  import { resolveComponentStyles } from "./component-styles.js";
10
12
  import { svgIconUrl } from "./svg-icon.js";
@@ -108,17 +110,14 @@ export default function GlobalStyles() {
108
110
  border: "0",
109
111
  });
110
112
 
111
- useGlobalStyles("html, body, button, input, select, textarea", {
112
- fontFamily: "$body-font-family",
113
- });
114
-
115
113
  useGlobalStyles("body", {
116
114
  color: "#text",
117
115
  fill: "#surface",
118
- fontSize: "$body-font-size",
119
- fontWeight: "$body-font-weight",
120
- lineHeight: "$body-line-height",
121
- letterSpacing: "$body-letter-spacing",
116
+ preset: "body",
117
+ });
118
+
119
+ useGlobalStyles(":where(strong, b)", {
120
+ preset: "strong",
122
121
  });
123
122
 
124
123
  useGlobalStyles("a", {
@@ -260,7 +259,7 @@ export default function GlobalStyles() {
260
259
  padding: "($gap * 1.5) $docs-nav-pad-x",
261
260
  color: "#accent-surface-text",
262
261
  fill: "#accent-surface",
263
- fontWeight: "$body-bold-font-weight",
262
+ preset: "body / strong",
264
263
  lineHeight: "$heading-line-height",
265
264
  textAlign: "center",
266
265
  textWrap: "balance",
@@ -297,50 +296,36 @@ export default function GlobalStyles() {
297
296
 
298
297
  useGlobalStyles(":where(h1, h2, h3, h4, h5, h6), .site-title", {
299
298
  color: "#text",
300
- fontFamily: "$heading-font-family",
301
- fontWeight: "$heading-font-weight",
302
- letterSpacing: "$heading-letter-spacing",
299
+ preset: "heading",
303
300
  textWrap: "balance",
304
301
  });
305
302
 
306
303
  useGlobalStyles("h1", {
307
- fontSize: "$h1-font-size",
308
- lineHeight: "$h1-line-height",
309
- letterSpacing: "$h1-letter-spacing",
304
+ preset: "h1",
310
305
  });
311
306
 
312
307
  useGlobalStyles("h2", {
313
- fontSize: "$h2-font-size",
314
- lineHeight: "$h2-line-height",
315
- letterSpacing: "$h2-letter-spacing",
308
+ preset: "h2",
316
309
  });
317
310
 
318
311
  useGlobalStyles("h3", {
319
- fontSize: "$h3-font-size",
320
- lineHeight: "$h3-line-height",
321
- letterSpacing: "$h3-letter-spacing",
312
+ preset: "h3",
322
313
  });
323
314
 
324
315
  useGlobalStyles("h4", {
325
- fontSize: "$h4-font-size",
326
- lineHeight: "$h4-line-height",
327
- letterSpacing: "$h4-letter-spacing",
316
+ preset: "h4",
328
317
  });
329
318
 
330
319
  useGlobalStyles("h5", {
331
- fontSize: "$h5-font-size",
332
- lineHeight: "$h5-line-height",
333
- letterSpacing: "$h5-letter-spacing",
320
+ preset: "h5",
334
321
  });
335
322
 
336
323
  useGlobalStyles("h6", {
337
- fontSize: "$h6-font-size",
338
- lineHeight: "$h6-line-height",
339
- letterSpacing: "$h6-letter-spacing",
324
+ preset: "h6",
340
325
  });
341
326
 
342
327
  useGlobalStyles(":where(code, kbd, samp, pre)", {
343
- fontFamily: "$code-font-family",
328
+ preset: "code",
344
329
  });
345
330
 
346
331
  useGlobalStyles(
@@ -434,8 +419,7 @@ export default function GlobalStyles() {
434
419
  minInlineSize: "0",
435
420
  overflow: "hidden",
436
421
  color: "#text",
437
- fontSize: "0.9375rem",
438
- fontWeight: "$body-bold-font-weight",
422
+ preset: "navigation / strong",
439
423
  textOverflow: "ellipsis",
440
424
  whiteSpace: "nowrap",
441
425
  },
@@ -446,7 +430,7 @@ export default function GlobalStyles() {
446
430
  minInlineSize: "0",
447
431
  gap: "0.25em",
448
432
  fill: "#surface",
449
- fontSize: "0.9375rem",
433
+ preset: "navigation",
450
434
  },
451
435
  LinkLabel: {
452
436
  $: "a > span:first-child",
@@ -466,9 +450,8 @@ export default function GlobalStyles() {
466
450
  },
467
451
  TopLevelLink: {
468
452
  $: "a.large",
469
- fontSize: "0.9375rem",
470
- fontWeight: "$body-bold-font-weight",
471
453
  color: "#text",
454
+ preset: "navigation / strong",
472
455
  },
473
456
  }),
474
457
  );
@@ -484,8 +467,7 @@ export default function GlobalStyles() {
484
467
  $: "h2",
485
468
  marginBlockEnd: "$gap",
486
469
  color: "#text",
487
- fontSize: "0.9375rem",
488
- fontWeight: "$body-bold-font-weight",
470
+ preset: "navigation / strong",
489
471
  lineHeight: "$heading-line-height",
490
472
  },
491
473
  List: {
@@ -513,8 +495,7 @@ export default function GlobalStyles() {
513
495
  paddingBlockStart: "($gap * 0.5)",
514
496
  paddingBlockEnd: "($gap * 0.5)",
515
497
  color: "#text-muted",
516
- fontSize: "$small-font-size",
517
- lineHeight: "1.45",
498
+ preset: "small",
518
499
  textDecoration: "none",
519
500
  overflowWrap: "anywhere",
520
501
  },
@@ -551,6 +532,116 @@ export default function GlobalStyles() {
551
532
  preset: "h1",
552
533
  });
553
534
 
535
+ useGlobalStyles(
536
+ ".hero",
537
+ resolveComponentStyles("Hero", {
538
+ display: "grid",
539
+ gridTemplateColumns: {
540
+ "": "minmax(0, 7fr) minmax(12rem, 4fr)",
541
+ "@mobile": "minmax(0, 1fr)",
542
+ },
543
+ alignItems: "center",
544
+ gap: "clamp(2rem, 5vw, 5rem)",
545
+ paddingBlockStart: {
546
+ "": "clamp(3rem, 8vw, 7rem)",
547
+ "@mobile": "($gap * 4)",
548
+ },
549
+ paddingBlockEnd: "clamp(2rem, 6vw, 5rem)",
550
+ Visual: {
551
+ $: "> img, > .hero-html",
552
+ order: { "": "2", "@mobile": "0" },
553
+ display: "grid",
554
+ placeItems: "center",
555
+ inlineSize: "min(100%, 22rem)",
556
+ marginInlineStart: "auto",
557
+ marginInlineEnd: "auto",
558
+ color: "#accent-surface",
559
+ },
560
+ Stack: {
561
+ $: "> .stack",
562
+ display: "flex",
563
+ flow: "column",
564
+ alignItems: { "": "flex-start", "@mobile": "center" },
565
+ gap: "clamp(1.5rem, 3vw, 2rem)",
566
+ textAlign: { "": "start", "@mobile": "center" },
567
+ },
568
+ Copy: {
569
+ $: "> .stack > .copy",
570
+ display: "flex",
571
+ flow: "column",
572
+ alignItems: "inherit",
573
+ gap: "($gap * 2)",
574
+ },
575
+ Title: {
576
+ $: "h1",
577
+ maxInlineSize: "16ch",
578
+ margin: "0",
579
+ color: "#text",
580
+ preset: "h1",
581
+ fontSize: "clamp(2.75rem, 7vw, 4.75rem)",
582
+ textWrap: "balance",
583
+ },
584
+ Tagline: {
585
+ $: ".tagline",
586
+ maxInlineSize: "48ch",
587
+ color: "#text-soft",
588
+ fontSize: "clamp(1.05rem, 2.5vw, 1.35rem)",
589
+ lineHeight: "1.55",
590
+ textWrap: "balance",
591
+ },
592
+ Actions: {
593
+ $: ".actions",
594
+ display: "flex",
595
+ flow: "row wrap",
596
+ justifyContent: { "": "flex-start", "@mobile": "center" },
597
+ gap: "($gap * 1.5)",
598
+ },
599
+ Action: {
600
+ $: ".sl-link-button",
601
+ display: "inline-flex",
602
+ alignItems: "center",
603
+ minBlockSize: "$control-height",
604
+ padding: "($gap * 1.25) ($gap * 2.5)",
605
+ gap: "$gap",
606
+ color: "#text",
607
+ border: true,
608
+ radius: "999px",
609
+ fill: "#surface-2",
610
+ preset: "navigation / strong",
611
+ textDecoration: "none",
612
+ transition: "fill 120ms ease, translate 120ms ease",
613
+ },
614
+ HoverAction: {
615
+ $: ".sl-link-button:hover",
616
+ fill: "#surface-2-hover",
617
+ translate: "0 -1px",
618
+ },
619
+ PrimaryAction: {
620
+ $: ".sl-link-button.primary",
621
+ color: "#accent-surface-text",
622
+ borderColor: "#accent-surface",
623
+ fill: "#accent-surface",
624
+ },
625
+ SecondaryAction: {
626
+ $: ".sl-link-button.secondary",
627
+ color: "#accent-text",
628
+ borderColor: "#border-strong",
629
+ },
630
+ MinimalAction: {
631
+ $: ".sl-link-button.minimal",
632
+ paddingInlineStart: "0",
633
+ paddingInlineEnd: "0",
634
+ color: "#accent-text",
635
+ border: "0",
636
+ fill: "#clear",
637
+ },
638
+ ActionIcon: {
639
+ $: ".sl-link-button svg",
640
+ flexShrink: "0",
641
+ },
642
+ }),
643
+ );
644
+
554
645
  useGlobalStyles("main > .content-panel:first-of-type", {
555
646
  paddingBlockStart: "($gap * 3)",
556
647
  paddingBlockEnd: "($gap * 2)",
@@ -605,7 +696,7 @@ export default function GlobalStyles() {
605
696
  });
606
697
 
607
698
  useGlobalStyles(".sl-markdown-content dt:not(:where(.not-content *))", {
608
- fontWeight: "$body-bold-font-weight",
699
+ preset: "strong",
609
700
  });
610
701
 
611
702
  useGlobalStyles(".sl-markdown-content dd:not(:where(.not-content *))", {
@@ -632,25 +723,87 @@ export default function GlobalStyles() {
632
723
  },
633
724
  );
634
725
 
635
- useGlobalStyles(".sl-markdown-content pre:not(:where(.not-content *))", {
636
- padding: "0.875rem 1rem",
637
- overflowX: "auto",
638
- color: "#syntax-text",
639
- border: true,
640
- fill: "#syntax-bg",
641
- fontSize: "$code-font-size",
642
- lineHeight: "$code-line-height",
643
- radius: "$card-radius",
644
- tabSize: "2",
645
- });
726
+ useGlobalStyles(
727
+ ".sl-markdown-content .td-code-block",
728
+ resolveComponentStyles("MarkdownCodeBlock", {
729
+ display: "block",
730
+ position: "relative",
731
+ minInlineSize: "0",
732
+ Pre: {
733
+ $: "> pre",
734
+ margin: "0",
735
+ padding: "0.875rem 3.75rem 0.875rem 1rem",
736
+ overflowX: "auto",
737
+ color: "#syntax-text",
738
+ border: true,
739
+ fill: "#syntax-bg",
740
+ radius: "$card-radius",
741
+ tabSize: "2",
742
+ },
743
+ CopyButton: {
744
+ $: "> [data-copy-code]",
745
+ position: "absolute",
746
+ zIndex: "1",
747
+ insetBlockStart: "$gap",
748
+ insetInlineEnd: "$gap",
749
+ margin: "0",
750
+ display: "grid",
751
+ placeItems: "center",
752
+ inlineSize: "2rem",
753
+ minInlineSize: "2rem",
754
+ blockSize: "2rem",
755
+ minBlockSize: "2rem",
756
+ padding: "0",
757
+ color: "#text-soft",
758
+ border: true,
759
+ fill: "#surface-2",
760
+ radius: "$radius",
761
+ preset: "small / strong",
762
+ cursor: "pointer",
763
+ transition: "color 120ms ease, fill 120ms ease",
764
+ },
765
+ HoverCopyButton: {
766
+ $: "> [data-copy-code]:hover",
767
+ color: "#text",
768
+ fill: "#surface-2-hover",
769
+ },
770
+ CopiedButton: {
771
+ $: '> [data-copy-code][data-copy-state="copied"]',
772
+ color: "#green-text",
773
+ borderColor: "#green",
774
+ },
775
+ CopyIcon: {
776
+ $: "> [data-copy-code] > [data-copy-icon]",
777
+ display: "block",
778
+ inlineSize: "1rem",
779
+ blockSize: "1rem",
780
+ fill: "#current",
781
+ mask: `url("${svgIconUrl(copyIcon)}") center / contain no-repeat`,
782
+ },
783
+ CopiedIcon: {
784
+ $: '> [data-copy-code][data-copy-state="copied"] > [data-copy-icon]',
785
+ mask: `url("${svgIconUrl(checkIcon)}") center / contain no-repeat`,
786
+ },
787
+ }),
788
+ );
789
+
790
+ useGlobalStyles(
791
+ '.sl-markdown-content pre[data-language="mermaid"]:not(:where(.not-content *))',
792
+ {
793
+ padding: "0.875rem 1rem",
794
+ overflowX: "auto",
795
+ color: "#syntax-text",
796
+ border: true,
797
+ fill: "#syntax-bg",
798
+ radius: "$card-radius",
799
+ tabSize: "2",
800
+ },
801
+ );
646
802
 
647
803
  useGlobalStyles(".sl-markdown-content pre code", {
648
804
  padding: "0",
649
805
  color: "inherit",
650
806
  fill: "#clear",
651
- fontFamily: "$code-font-family",
652
- fontSize: "inherit",
653
- lineHeight: "inherit",
654
807
  });
655
808
 
656
809
  useGlobalStyles(".sl-markdown-content pre.td-diff", {
@@ -754,7 +907,7 @@ export default function GlobalStyles() {
754
907
  marginInlineStart: "-0.5rem",
755
908
  paddingInlineStart: "0.5rem",
756
909
  color: "#text",
757
- fontWeight: "$body-bold-font-weight",
910
+ preset: "strong",
758
911
  });
759
912
 
760
913
  useGlobalStyles(
@@ -793,57 +946,34 @@ export default function GlobalStyles() {
793
946
  },
794
947
  );
795
948
 
796
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper", {
797
- lineHeight: "$heading-line-height",
798
- });
799
-
800
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h1", {
801
- fontSize: "$h1-font-size",
802
- });
803
-
804
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h2", {
805
- fontSize: "$h2-font-size",
806
- });
807
-
808
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h3", {
809
- fontSize: "$h3-font-size",
810
- });
811
-
812
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h4", {
813
- fontSize: "$h4-font-size",
814
- });
815
-
816
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h5", {
817
- fontSize: "$h5-font-size",
818
- });
819
-
820
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper.level-h6", {
821
- fontSize: "$h6-font-size",
822
- });
823
-
824
- useGlobalStyles(".sl-markdown-content .sl-heading-wrapper > :first-child", {
825
- display: "inline",
826
- paddingInlineEnd: "1.1em",
827
- });
828
-
829
- useGlobalStyles(".sl-markdown-content .sl-anchor-link", {
830
- position: "relative",
831
- display: "inline-flex",
832
- marginInlineStart: "-0.85em",
833
- color: "#text-muted",
834
- userSelect: "none",
835
- textDecoration: "none",
836
- });
837
-
838
- useGlobalStyles(".sl-markdown-content .sl-anchor-link:hover", {
839
- color: "#accent-text",
840
- });
841
-
842
- useGlobalStyles(".sl-markdown-content .sl-anchor-icon > svg", {
843
- display: "inline",
844
- inlineSize: "0.8275em",
845
- verticalAlign: "middle",
846
- });
949
+ useGlobalStyles(
950
+ ".sl-markdown-content .sl-heading-wrapper",
951
+ resolveComponentStyles("MarkdownHeading", {
952
+ preset: "heading",
953
+ Heading: {
954
+ $: "> :first-child",
955
+ display: "inline",
956
+ paddingInlineEnd: "0.35em",
957
+ },
958
+ Heading1: { $: "&.level-h1", preset: "h1" },
959
+ Heading2: { $: "&.level-h2", preset: "h2" },
960
+ Heading3: { $: "&.level-h3", preset: "h3" },
961
+ Heading4: { $: "&.level-h4", preset: "h4" },
962
+ Heading5: { $: "&.level-h5", preset: "h5" },
963
+ Heading6: { $: "&.level-h6", preset: "h6" },
964
+ Link: {
965
+ $: "> .sl-anchor-link",
966
+ display: "inline-flex",
967
+ color: "#text-muted",
968
+ userSelect: "none",
969
+ textDecoration: "none",
970
+ },
971
+ HoverLink: {
972
+ $: "> .sl-anchor-link:hover",
973
+ color: "#accent-text",
974
+ },
975
+ }),
976
+ );
847
977
 
848
978
  useGlobalStyles(".starlight-aside", {
849
979
  padding: "($gap * 2) ($gap * 2.5)",
@@ -859,7 +989,7 @@ export default function GlobalStyles() {
859
989
  gap: "$gap",
860
990
  margin: "0 0 $gap",
861
991
  color: "#text",
862
- fontWeight: "$body-bold-font-weight",
992
+ preset: "strong",
863
993
  });
864
994
 
865
995
  useGlobalStyles(".starlight-aside__icon", {
@@ -913,7 +1043,7 @@ export default function GlobalStyles() {
913
1043
 
914
1044
  useGlobalStyles(".sl-link-card a", {
915
1045
  color: "#text",
916
- fontWeight: "$body-bold-font-weight",
1046
+ preset: "strong",
917
1047
  textDecoration: "none",
918
1048
  });
919
1049
 
@@ -934,7 +1064,7 @@ export default function GlobalStyles() {
934
1064
  border: true,
935
1065
  radius: "$radius",
936
1066
  fill: "#surface-3",
937
- fontFamily: "$code-font-family",
1067
+ preset: "code",
938
1068
  fontSize: "$small-font-size",
939
1069
  lineHeight: "1",
940
1070
  overflowWrap: "anywhere",
@@ -967,8 +1097,7 @@ export default function GlobalStyles() {
967
1097
  border: true,
968
1098
  radius: "999px",
969
1099
  fill: "#surface-3",
970
- fontSize: "$small-font-size",
971
- fontWeight: "$body-bold-font-weight",
1100
+ preset: "small / strong",
972
1101
  });
973
1102
 
974
1103
  useGlobalStyles(".sl-steps > li::after", {
@@ -992,7 +1121,7 @@ export default function GlobalStyles() {
992
1121
  color: "#text-soft",
993
1122
  border: true,
994
1123
  fill: "#surface",
995
- fontSize: "$small-font-size",
1124
+ preset: "small",
996
1125
  boxShadow: "none",
997
1126
  cursor: "pointer",
998
1127
  transition: "color 120ms ease, background-color 120ms ease",
@@ -1012,7 +1141,7 @@ export default function GlobalStyles() {
1012
1141
  paddingInlineStart: "0.375rem",
1013
1142
  paddingInlineEnd: "0.375rem",
1014
1143
  fill: "#surface-3",
1015
- fontFamily: "$body-font-family",
1144
+ preset: "body",
1016
1145
  fontSize: "0.75rem",
1017
1146
  radius: "($radius * 0.75)",
1018
1147
  });
@@ -1070,29 +1199,52 @@ export default function GlobalStyles() {
1070
1199
  preset: "h5 / strong",
1071
1200
  });
1072
1201
 
1073
- useGlobalStyles("starlight-lang-select label", {
1074
- position: "relative",
1075
- display: "flex",
1076
- alignItems: "center",
1077
- gap: "($gap * 0.5)",
1078
- color: "#text-soft",
1079
- });
1080
-
1081
- useGlobalStyles("starlight-lang-select label:hover", {
1082
- color: "#text",
1083
- });
1084
-
1085
- useGlobalStyles("starlight-lang-select select", {
1086
- color: "#text-soft",
1087
- border: "0",
1088
- fill: "#clear",
1089
- cursor: "pointer",
1090
- });
1091
-
1092
- useGlobalStyles("starlight-lang-select option", {
1093
- color: "#text",
1094
- fill: "#surface-2",
1095
- });
1202
+ useGlobalStyles(
1203
+ "starlight-lang-select",
1204
+ resolveComponentStyles("LanguageSelect", {
1205
+ display: "block",
1206
+ Label: {
1207
+ $: "label",
1208
+ position: "relative",
1209
+ display: "flex",
1210
+ alignItems: "center",
1211
+ color: "#text-soft",
1212
+ },
1213
+ HoverLabel: { $: "label:hover", color: "#text" },
1214
+ LabelIcon: {
1215
+ $: ".label-icon",
1216
+ position: "absolute",
1217
+ zIndex: "1",
1218
+ insetInlineStart: "$gap",
1219
+ pointerEvents: "none",
1220
+ },
1221
+ Select: {
1222
+ $: "select",
1223
+ appearance: "none",
1224
+ inlineSize: "8rem",
1225
+ minBlockSize: "$control-height",
1226
+ paddingInlineStart: "($gap * 3.5)",
1227
+ paddingInlineEnd: "($gap * 3.5)",
1228
+ color: "#text-soft",
1229
+ border: "0",
1230
+ fill: "#clear",
1231
+ preset: "small",
1232
+ cursor: "pointer",
1233
+ textOverflow: "ellipsis",
1234
+ },
1235
+ Caret: {
1236
+ $: ".caret",
1237
+ position: "absolute",
1238
+ insetInlineEnd: "$gap",
1239
+ pointerEvents: "none",
1240
+ },
1241
+ Option: {
1242
+ $: "option",
1243
+ color: "#text",
1244
+ fill: "#surface-2",
1245
+ },
1246
+ }),
1247
+ );
1096
1248
 
1097
1249
  useGlobalStyles(".td-header__social a, .td-mobile-preferences__social a", {
1098
1250
  color: "#accent-text",
@@ -1240,8 +1392,7 @@ export default function GlobalStyles() {
1240
1392
  borderColor: "#border",
1241
1393
  radius: "$radius",
1242
1394
  fill: "#surface-3",
1243
- fontSize: "$small-font-size",
1244
- fontWeight: "$body-bold-font-weight",
1395
+ preset: "small / strong",
1245
1396
  boxShadow: "none",
1246
1397
  cursor: "pointer",
1247
1398
  transition: "color 120ms ease, background-color 120ms ease",
@@ -1306,7 +1457,7 @@ export default function GlobalStyles() {
1306
1457
 
1307
1458
  useGlobalStyles("#starlight__search .pagefind-ui__result-link", {
1308
1459
  color: "#text",
1309
- fontWeight: "$body-bold-font-weight",
1460
+ preset: "strong",
1310
1461
  });
1311
1462
 
1312
1463
  useGlobalStyles("[data-search-modal-open]", {
@@ -1436,9 +1587,7 @@ export default function GlobalStyles() {
1436
1587
  margin: "0",
1437
1588
  padding: "0",
1438
1589
  color: "#text-soft",
1439
- fontSize: "$small-font-size",
1440
- fontWeight: "$body-bold-font-weight",
1441
- lineHeight: "$small-line-height",
1590
+ preset: "small / strong",
1442
1591
  border: "0",
1443
1592
  radius: "0",
1444
1593
  fill: "#clear",
@@ -1574,8 +1723,7 @@ export default function GlobalStyles() {
1574
1723
  borderCollapse: "separate",
1575
1724
  borderSpacing: "0",
1576
1725
  color: "#text-soft",
1577
- fontSize: "$small-font-size",
1578
- lineHeight: "$small-line-height",
1726
+ preset: "small",
1579
1727
  border: true,
1580
1728
  borderColor: "#border",
1581
1729
  radius: "$card-radius",
@@ -1623,6 +1771,9 @@ export default function GlobalStyles() {
1623
1771
  "$docs-nav-pad-x": {
1624
1772
  "@mobile": "1rem",
1625
1773
  },
1774
+ "$docs-content-pad-x": {
1775
+ "@mobile": "1rem",
1776
+ },
1626
1777
  "$docs-nav-gap": {
1627
1778
  "@mobile": "0.5rem",
1628
1779
  },
@@ -36,6 +36,7 @@ export const PackageVersionRoot = customizeComponent(
36
36
  as: "span",
37
37
  styles: {
38
38
  display: "inline-flex",
39
+ hide: { "": false, "@compact": true },
39
40
  alignItems: "center",
40
41
  flexShrink: "0",
41
42
  minBlockSize: "1.5rem",
@@ -162,10 +163,13 @@ export const StarlightHeaderRoot = customizeComponent(
162
163
  },
163
164
  SiteTitle: {
164
165
  $: ".site-title",
166
+ minInlineSize: "0",
167
+ overflow: "hidden",
165
168
  color: "#text",
166
169
  preset: { "": "h4 / strong", "@mobile": "h5 / strong" },
167
170
  textDecoration: "none",
168
171
  whiteSpace: "nowrap",
172
+ textOverflow: "ellipsis",
169
173
  },
170
174
  Search: {
171
175
  $: ".td-header__search",
@@ -231,7 +235,7 @@ export const StarlightHeaderRoot = customizeComponent(
231
235
  }),
232
236
  );
233
237
 
234
- const appearanceSelectStyles = {
238
+ export const appearanceSelectStyles = {
235
239
  display: "grid",
236
240
  flexShrink: "0",
237
241
  placeItems: "center",
@@ -276,7 +280,7 @@ const appearanceSelectStyles = {
276
280
  },
277
281
  Select: {
278
282
  $: "select",
279
- appearance: { "": "base-select", "@mobile": "none" },
283
+ appearance: "base-select",
280
284
  position: "static",
281
285
  inlineSize: "100%",
282
286
  minInlineSize: "0",