@stacksjs/bunpress 0.1.21 → 0.2.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.
Files changed (54) hide show
  1. package/dist/bin/cli.d.ts +3 -0
  2. package/dist/bin/cli.js +1 -1
  3. package/dist/{chunk-kxr6zf7e.js → chunk-2ns9va8d.js} +1315 -464
  4. package/dist/{chunk-qdmkac4z.js → chunk-av14gbps.js} +10 -11
  5. package/dist/{chunk-m0g9vk1e.js → chunk-avg4ftb9.js} +159 -194
  6. package/dist/chunk-fyb5bzsp.js +10 -0
  7. package/dist/chunk-n0ebp7d8.js +38 -0
  8. package/dist/{chunk-qrp18ybj.js → chunk-trhgd2dy.js} +1 -1
  9. package/dist/chunk-w615shtf.js +2 -0
  10. package/dist/chunk-x5m3c6jd.js +469 -0
  11. package/dist/src/build-manifest.d.ts +22 -0
  12. package/dist/src/config.d.ts +12 -0
  13. package/dist/src/data-loader.d.ts +6 -3
  14. package/dist/src/highlighter.d.ts +2 -1
  15. package/dist/src/i18n.d.ts +67 -0
  16. package/dist/src/index.d.ts +2 -0
  17. package/dist/src/index.js +1 -1
  18. package/dist/src/page-meta.d.ts +19 -0
  19. package/dist/src/search-index.d.ts +61 -0
  20. package/dist/src/serve.d.ts +20 -5
  21. package/dist/src/toc.d.ts +6 -2
  22. package/dist/src/types.d.ts +80 -8
  23. package/dist/templates/blocks/alerts/caution.stx +2 -2
  24. package/dist/templates/blocks/alerts/important.stx +2 -2
  25. package/dist/templates/blocks/alerts/note.stx +2 -2
  26. package/dist/templates/blocks/alerts/tip.stx +2 -2
  27. package/dist/templates/blocks/alerts/warning.stx +2 -2
  28. package/dist/templates/blocks/containers/danger.stx +2 -2
  29. package/dist/templates/blocks/containers/details.stx +2 -2
  30. package/dist/templates/blocks/containers/info.stx +2 -2
  31. package/dist/templates/blocks/containers/raw.stx +1 -1
  32. package/dist/templates/blocks/containers/tip.stx +2 -2
  33. package/dist/templates/blocks/containers/warning.stx +2 -2
  34. package/dist/templates/copy-page.stx +81 -0
  35. package/dist/templates/doc-footer.stx +51 -0
  36. package/dist/templates/footer.stx +45 -0
  37. package/dist/templates/hero.stx +9 -2
  38. package/dist/templates/layout-doc.stx +8 -125
  39. package/dist/templates/layout-home.stx +7 -14
  40. package/dist/templates/layout-page.stx +7 -14
  41. package/dist/templates/locale-switcher.stx +115 -0
  42. package/dist/templates/navbar.stx +49 -0
  43. package/dist/templates/page-outline.stx +149 -0
  44. package/dist/templates/page-toc.stx +1 -1
  45. package/dist/templates/search-algolia.stx +85 -0
  46. package/dist/templates/search.stx +661 -0
  47. package/dist/templates/sidebar-section.stx +44 -11
  48. package/dist/templates/sidebar.stx +11 -2
  49. package/dist/themes/vitepress/index.ts +558 -165
  50. package/package.json +16 -7
  51. package/dist/chunk-9cm3e4r4.js +0 -688
  52. package/dist/chunk-mjhqecp5.js +0 -467
  53. package/dist/chunk-wmvgjzgh.js +0 -3
  54. package/dist/chunk-zmxtnx2v.js +0 -8
@@ -236,6 +236,9 @@ const varsCSS = `/**
236
236
  --bp-z-index-layout-top: 40;
237
237
  --bp-z-index-backdrop: 50;
238
238
  --bp-z-index-sidebar: 60;
239
+ /* Above the sidebar drawer: search opens over everything, including a
240
+ * drawer left open behind it. */
241
+ --bp-z-index-search: 200;
239
242
  }
240
243
 
241
244
  @media (min-width: 960px) {
@@ -349,37 +352,43 @@ const varsCSS = `/**
349
352
  --bp-custom-block-font-size: 14px;
350
353
  --bp-custom-block-code-font-size: 13px;
351
354
 
352
- --bp-custom-block-info-border: transparent;
355
+ /* The *-border colour is drawn only on the leading edge (see .custom-block),
356
+ * so it carries the block's identity — hence a solid accent, not transparent.
357
+ * Info/note are neutral, so they take a mid-grey: --bp-c-default-1 is a
358
+ * near-white tint that vanishes against the block's own soft background. */
359
+ --bp-custom-block-info-border: var(--bp-c-text-3);
353
360
  --bp-custom-block-info-text: var(--bp-c-text-1);
354
361
  --bp-custom-block-info-bg: var(--bp-c-default-soft);
355
362
  --bp-custom-block-info-code-bg: var(--bp-c-default-soft);
356
363
 
357
- --bp-custom-block-note-border: transparent;
364
+ /* note carries a brand-coloured title and icon, so its rail matches those
365
+ * rather than the neutral background it shares with info. */
366
+ --bp-custom-block-note-border: var(--bp-c-note-1);
358
367
  --bp-custom-block-note-text: var(--bp-c-text-1);
359
368
  --bp-custom-block-note-bg: var(--bp-c-default-soft);
360
369
  --bp-custom-block-note-code-bg: var(--bp-c-default-soft);
361
370
 
362
- --bp-custom-block-tip-border: transparent;
371
+ --bp-custom-block-tip-border: var(--bp-c-tip-1);
363
372
  --bp-custom-block-tip-text: var(--bp-c-text-1);
364
373
  --bp-custom-block-tip-bg: var(--bp-c-tip-soft);
365
374
  --bp-custom-block-tip-code-bg: var(--bp-c-tip-soft);
366
375
 
367
- --bp-custom-block-important-border: transparent;
376
+ --bp-custom-block-important-border: var(--bp-c-important-1);
368
377
  --bp-custom-block-important-text: var(--bp-c-text-1);
369
378
  --bp-custom-block-important-bg: var(--bp-c-important-soft);
370
379
  --bp-custom-block-important-code-bg: var(--bp-c-important-soft);
371
380
 
372
- --bp-custom-block-warning-border: transparent;
381
+ --bp-custom-block-warning-border: var(--bp-c-warning-1);
373
382
  --bp-custom-block-warning-text: var(--bp-c-text-1);
374
383
  --bp-custom-block-warning-bg: var(--bp-c-warning-soft);
375
384
  --bp-custom-block-warning-code-bg: var(--bp-c-warning-soft);
376
385
 
377
- --bp-custom-block-danger-border: transparent;
386
+ --bp-custom-block-danger-border: var(--bp-c-danger-1);
378
387
  --bp-custom-block-danger-text: var(--bp-c-text-1);
379
388
  --bp-custom-block-danger-bg: var(--bp-c-danger-soft);
380
389
  --bp-custom-block-danger-code-bg: var(--bp-c-danger-soft);
381
390
 
382
- --bp-custom-block-caution-border: transparent;
391
+ --bp-custom-block-caution-border: var(--bp-c-caution-1);
383
392
  --bp-custom-block-caution-text: var(--bp-c-text-1);
384
393
  --bp-custom-block-caution-bg: var(--bp-c-caution-soft);
385
394
  --bp-custom-block-caution-code-bg: var(--bp-c-caution-soft);
@@ -838,6 +847,10 @@ mjx-container > svg {
838
847
  position: relative;
839
848
  font-weight: 600;
840
849
  outline: none;
850
+ /* Anchor jumps — from the outline, the sidebar or an external deep link —
851
+ * otherwise land the heading flush against the top edge of the scroll
852
+ * container, with no separation from the chrome above it. */
853
+ scroll-margin-top: 24px;
841
854
  }
842
855
 
843
856
  .bp-doc h1 {
@@ -949,6 +962,12 @@ mjx-container > svg {
949
962
  transition: color 0.5s;
950
963
  }
951
964
 
965
+ /* Zeroing every paragraph margin ran a multi-paragraph quote together as if
966
+ * it were one block of prose. */
967
+ .bp-doc blockquote > p + p {
968
+ margin-top: 16px;
969
+ }
970
+
952
971
  .bp-doc a {
953
972
  font-weight: 500;
954
973
  color: var(--bp-c-brand-1);
@@ -969,27 +988,72 @@ mjx-container > svg {
969
988
  * Lists
970
989
  * -------------------------------------------------------------------------- */
971
990
 
991
+ /* Markers hang in the gutter (\`outside\`) so wrapped lines stay flush with the
992
+ * first line — the single biggest readability win for multi-line bullets. The
993
+ * indent is wide enough for two-digit ordered markers without clipping. */
972
994
  .bp-doc ul,
973
995
  .bp-doc ol {
974
- padding-left: 1.25rem;
996
+ padding-left: 1.5rem;
975
997
  margin: 16px 0;
998
+ list-style-position: outside;
976
999
  }
977
1000
 
978
1001
  .bp-doc ul {
979
- list-style: disc;
1002
+ list-style-type: disc;
980
1003
  }
981
1004
 
982
1005
  .bp-doc ol {
983
- list-style: decimal;
1006
+ list-style-type: decimal;
984
1007
  }
985
1008
 
986
- .bp-doc li + li {
987
- margin-top: 8px;
1009
+ .bp-doc li {
1010
+ margin: 6px 0;
1011
+ line-height: 1.75;
1012
+ }
1013
+
1014
+ .bp-doc li::marker {
1015
+ color: var(--bp-c-text-3);
988
1016
  }
989
1017
 
1018
+ .bp-doc ol > li::marker {
1019
+ font-variant-numeric: tabular-nums;
1020
+ }
1021
+
1022
+ /* A nested list belongs to its parent item, so it hugs it rather than
1023
+ * inheriting the full inter-item gap. */
990
1024
  .bp-doc li > ol,
991
1025
  .bp-doc li > ul {
992
- margin: 8px 0 0;
1026
+ margin: 6px 0 0;
1027
+ padding-left: 1.5rem;
1028
+ }
1029
+
1030
+ .bp-doc ul ul {
1031
+ list-style-type: circle;
1032
+ }
1033
+
1034
+ .bp-doc ul ul ul {
1035
+ list-style-type: square;
1036
+ }
1037
+
1038
+ /* Loose lists (blank lines between items) wrap each item's text in a <p>.
1039
+ * Without this the paragraph's 16px margins double the list's spacing. */
1040
+ .bp-doc li > p {
1041
+ margin: 0;
1042
+ }
1043
+
1044
+ .bp-doc li > p + p {
1045
+ margin-top: 12px;
1046
+ }
1047
+
1048
+ /* Block content inside an item stays indented with the item, and never
1049
+ * bleeds full-width the way a top-level code block does. */
1050
+ .bp-doc li > pre,
1051
+ .bp-doc li > div[class*='language-'],
1052
+ .bp-doc li > pre[data-lang],
1053
+ .bp-doc li > blockquote,
1054
+ .bp-doc li > .table-responsive,
1055
+ .bp-doc li > .custom-block {
1056
+ margin: 12px 0;
993
1057
  }
994
1058
 
995
1059
  /* Task list styles */
@@ -998,16 +1062,29 @@ mjx-container > svg {
998
1062
  padding-left: 0;
999
1063
  }
1000
1064
 
1065
+ /* A list of task items has checkboxes where the markers would be, so the
1066
+ * marker gutter is dead space. Scoped with :has() so a list that merely
1067
+ * contains one task item keeps its indent for the plain items. */
1068
+ .bp-doc ul:has(> .task-list-item) {
1069
+ padding-left: 0;
1070
+ list-style: none;
1071
+ }
1072
+
1001
1073
  .bp-doc .task-list-item {
1002
1074
  display: flex;
1003
1075
  align-items: flex-start;
1004
1076
  gap: 0.5rem;
1005
1077
  }
1006
1078
 
1079
+ /* .task-list-item-checkbox is what Bun.markdown emits; .task-list-checkbox is
1080
+ * kept for content that ships its own task-list markup. */
1081
+ .bp-doc .task-list-item-checkbox,
1007
1082
  .bp-doc .task-list-checkbox {
1008
- margin-top: 0.25rem;
1083
+ /* Nudged down to sit on the first line's cap height rather than its top. */
1084
+ margin: 0.3em 0 0;
1009
1085
  width: 1rem;
1010
1086
  height: 1rem;
1087
+ flex-shrink: 0;
1011
1088
  accent-color: var(--bp-c-brand-1);
1012
1089
  cursor: default;
1013
1090
  }
@@ -1021,39 +1098,115 @@ mjx-container > svg {
1021
1098
  * Table
1022
1099
  * -------------------------------------------------------------------------- */
1023
1100
 
1101
+ /* The scroll container owns overflow, so the table itself stays a real table.
1102
+ * (\`display: block\` on <table> collapses column sizing — the table shrinks to
1103
+ * its content instead of filling the row, and cell widths stop balancing.) */
1104
+ .bp-doc .table-responsive {
1105
+ margin: 20px 0;
1106
+ overflow-x: auto;
1107
+ overscroll-behavior-x: contain;
1108
+ border: 1px solid var(--bp-c-divider);
1109
+ border-radius: 8px;
1110
+ /* Clip the corner radius against the header's background fill. */
1111
+ background-color: var(--bp-c-bg);
1112
+ }
1113
+
1024
1114
  .bp-doc table {
1025
- display: block;
1115
+ display: table;
1116
+ width: 100%;
1026
1117
  border-collapse: collapse;
1027
1118
  margin: 20px 0;
1028
- overflow-x: auto;
1119
+ font-size: 14px;
1120
+ line-height: 1.6;
1121
+ }
1122
+
1123
+ /* Inside a scroll wrapper the wrapper supplies the outer spacing and frame. */
1124
+ .bp-doc .table-responsive > table {
1125
+ margin: 0;
1126
+ border: none;
1029
1127
  }
1030
1128
 
1031
1129
  .bp-doc tr {
1032
- background-color: var(--bp-c-bg);
1033
- border-top: 1px solid var(--bp-c-divider);
1034
- transition: background-color 0.5s;
1130
+ background-color: transparent;
1131
+ transition: background-color 0.25s;
1035
1132
  }
1036
1133
 
1037
- .bp-doc tr:nth-child(2n) {
1134
+ .bp-doc tbody tr:nth-child(2n) {
1038
1135
  background-color: var(--bp-c-bg-soft);
1039
1136
  }
1040
1137
 
1041
1138
  .bp-doc th,
1042
1139
  .bp-doc td {
1043
- border: 1px solid var(--bp-c-divider);
1044
- padding: 8px 16px;
1140
+ /* Row rules only — a full grid double-draws against the wrapper border and
1141
+ * makes dense config tables read as noise. */
1142
+ border-bottom: 1px solid var(--bp-c-divider);
1143
+ padding: 10px 16px;
1144
+ text-align: left;
1145
+ vertical-align: top;
1045
1146
  }
1046
1147
 
1047
- .bp-doc th {
1048
- text-align: left;
1049
- font-size: 14px;
1148
+ .bp-doc thead th {
1149
+ font-size: 13px;
1050
1150
  font-weight: 600;
1151
+ letter-spacing: 0.01em;
1051
1152
  color: var(--bp-c-text-2);
1052
1153
  background-color: var(--bp-c-bg-soft);
1154
+ border-bottom: 1px solid var(--bp-c-divider);
1155
+ white-space: nowrap;
1156
+ }
1157
+
1158
+ /* Last row sits flush against the wrapper's own bottom border. */
1159
+ .bp-doc tbody tr:last-child > th,
1160
+ .bp-doc tbody tr:last-child > td {
1161
+ border-bottom: none;
1053
1162
  }
1054
1163
 
1055
1164
  .bp-doc td {
1056
1165
  font-size: 14px;
1166
+ color: var(--bp-c-text-1);
1167
+ }
1168
+
1169
+ /* Long identifiers (\`preserveDirectoryStructure\`, \`Record<string, string>\`)
1170
+ * must not dictate column widths. \`anywhere\` — unlike \`break-word\` — also
1171
+ * lowers the cell's intrinsic minimum, which is what lets the auto table
1172
+ * algorithm hand the spare width to the prose column instead. */
1173
+ .bp-doc td > code,
1174
+ .bp-doc th > code {
1175
+ white-space: normal;
1176
+ overflow-wrap: anywhere;
1177
+ }
1178
+
1179
+ /* Narrow screens: a multi-column table squeezed into a phone width degenerates
1180
+ * into one word per line. Give it a readable floor and let the wrapper scroll
1181
+ * horizontally instead — scrolling a table beats shredding it. */
1182
+ @media (max-width: 767px) {
1183
+ .bp-doc .table-responsive > table {
1184
+ min-width: 38rem;
1185
+ }
1186
+
1187
+ .bp-doc thead th {
1188
+ white-space: normal;
1189
+ }
1190
+
1191
+ .bp-doc th,
1192
+ .bp-doc td {
1193
+ padding: 10px 12px;
1194
+ }
1195
+ }
1196
+
1197
+ /* Alignment from GFM's \`:---:\` / \`---:\` syntax must win over the default. */
1198
+ .bp-doc th[align='center'],
1199
+ .bp-doc td[align='center'],
1200
+ .bp-doc th[style*='center'],
1201
+ .bp-doc td[style*='center'] {
1202
+ text-align: center;
1203
+ }
1204
+
1205
+ .bp-doc th[align='right'],
1206
+ .bp-doc td[align='right'],
1207
+ .bp-doc th[style*='right'],
1208
+ .bp-doc td[style*='right'] {
1209
+ text-align: right;
1057
1210
  }
1058
1211
 
1059
1212
  /**
@@ -1080,6 +1233,19 @@ mjx-container > svg {
1080
1233
  padding: 3px 6px;
1081
1234
  background-color: var(--bp-code-bg);
1082
1235
  transition: color 0.25s, background-color 0.5s;
1236
+ /* Without clone, a code span that wraps loses its padding and rounding on
1237
+ * the broken edges, so a wrapped identifier reads as ragged half-boxes. */
1238
+ -webkit-box-decoration-break: clone;
1239
+ box-decoration-break: clone;
1240
+ }
1241
+
1242
+ /* Inline code sits on a text baseline, so it must not add leading of its own
1243
+ * — otherwise a paragraph containing code is spaced wider than its neighbours. */
1244
+ .bp-doc p > code,
1245
+ .bp-doc li > code,
1246
+ .bp-doc td > code,
1247
+ .bp-doc th > code {
1248
+ line-height: 1.4;
1083
1249
  }
1084
1250
 
1085
1251
  .bp-doc a > code {
@@ -1101,36 +1267,28 @@ mjx-container > svg {
1101
1267
  * Code blocks
1102
1268
  * -------------------------------------------------------------------------- */
1103
1269
 
1270
+ /* Inset, not full-bleed. The old \`margin: 16px -24px\` hard-coded the content
1271
+ * container's padding: once that padding changed on small screens the bleed
1272
+ * overshot it, hanging the block 8px off each edge and leaving the content
1273
+ * pane with a phantom horizontal scroll. Inset also matches how every other
1274
+ * block element here behaves (containers, tables, alerts). */
1104
1275
  .bp-doc div[class*='language-'],
1105
1276
  .bp-doc pre[data-lang],
1106
1277
  .bp-block {
1107
1278
  position: relative;
1108
- margin: 16px -24px;
1279
+ margin: 16px 0;
1280
+ border-radius: 8px;
1109
1281
  background-color: var(--bp-code-block-bg);
1110
1282
  overflow-x: auto;
1111
1283
  transition: background-color 0.5s;
1112
1284
  }
1113
1285
 
1114
- @media (min-width: 640px) {
1115
- .bp-doc div[class*='language-'],
1116
- .bp-doc pre[data-lang],
1117
- .bp-block {
1118
- border-radius: 8px;
1119
- margin: 16px 0;
1120
- }
1121
- }
1122
-
1123
- @media (max-width: 639px) {
1124
- .bp-doc li div[class*='language-'],
1125
- .bp-doc li pre[data-lang] {
1126
- border-radius: 8px 0 0 8px;
1127
- }
1128
- }
1129
-
1286
+ /* Wrapper divs that belong to one code group are pulled together. Bare
1287
+ * \`pre[data-lang]\` siblings are NOT a group — they are independent examples,
1288
+ * and the negative margin made consecutive blocks overlap into one slab. */
1130
1289
  .bp-doc div[class*='language-'] + div[class*='language-'],
1131
1290
  .bp-doc div[class$='-api'] + div[class*='language-'],
1132
- .bp-doc div[class*='language-'] + div[class$='-api'] > div[class*='language-'],
1133
- .bp-doc pre[data-lang] + pre[data-lang] {
1291
+ .bp-doc div[class*='language-'] + div[class$='-api'] > div[class*='language-'] {
1134
1292
  margin-top: -8px;
1135
1293
  }
1136
1294
 
@@ -1147,13 +1305,20 @@ mjx-container > svg {
1147
1305
  .bp-doc pre[data-lang] {
1148
1306
  position: relative;
1149
1307
  z-index: 1;
1150
- margin: 0;
1151
1308
  padding: 20px 0;
1152
- background: transparent;
1153
1309
  overflow-x: auto;
1154
1310
  text-align: left;
1155
1311
  }
1156
1312
 
1313
+ /* A pre nested in a language wrapper is not the block — the wrapper is — so it
1314
+ * contributes neither margin nor background of its own. A bare pre[data-lang]
1315
+ * IS the block and must keep the margin set above; zeroing it here (the rule
1316
+ * this splits out of) is what let consecutive blocks run together. */
1317
+ .bp-doc [class*='language-'] pre {
1318
+ margin: 0;
1319
+ background: transparent;
1320
+ }
1321
+
1157
1322
  .bp-doc [class*='language-'] code,
1158
1323
  .bp-doc pre[data-lang] code {
1159
1324
  display: block;
@@ -1166,14 +1331,21 @@ mjx-container > svg {
1166
1331
  transition: color 0.5s;
1167
1332
  }
1168
1333
 
1334
+ /* Marked rows bleed through the code element's 24px gutters so the band spans
1335
+ * the full block, not just the text column. min-width (rather than width) keeps
1336
+ * a line longer than the block from being clipped mid-band when it scrolls. */
1337
+ .bp-doc [class*='language-'] code :is(.highlighted, .diff, .diff-add, .diff-remove, .has-error, .has-warning),
1338
+ .bp-doc pre[data-lang] code :is(.highlighted, .diff, .diff-add, .diff-remove, .has-error, .has-warning) {
1339
+ display: inline-block;
1340
+ margin: 0 -24px;
1341
+ padding: 0 24px;
1342
+ min-width: calc(100% + 2 * 24px);
1343
+ transition: background-color 0.5s;
1344
+ }
1345
+
1169
1346
  .bp-doc [class*='language-'] code .highlighted,
1170
1347
  .bp-doc pre[data-lang] code .highlighted {
1171
1348
  background-color: var(--bp-code-line-highlight-color);
1172
- transition: background-color 0.5s;
1173
- margin: 0 -24px;
1174
- padding: 0 24px;
1175
- width: calc(100% + 2 * 24px);
1176
- display: inline-block;
1177
1349
  }
1178
1350
 
1179
1351
  .bp-doc [class*='language-'] code .highlighted.error,
@@ -1186,65 +1358,63 @@ mjx-container > svg {
1186
1358
  background-color: var(--bp-code-line-warning-color);
1187
1359
  }
1188
1360
 
1189
- .bp-doc [class*='language-'] code .diff,
1190
- .bp-doc pre[data-lang] code .diff {
1191
- transition: background-color 0.5s;
1192
- margin: 0 -24px;
1193
- padding: 0 24px;
1194
- width: calc(100% + 2 * 24px);
1195
- display: inline-block;
1196
- }
1197
-
1198
- .bp-doc [class*='language-'] code .diff::before,
1199
- .bp-doc pre[data-lang] code .diff::before {
1200
- position: absolute;
1201
- left: 10px;
1202
- }
1203
-
1204
- /* Focus lines with blur effect - matches VitePress exactly */
1205
- .bp-doc [class*='language-'] .has-focused-lines .line:not(.has-focus),
1206
- .bp-doc pre[data-lang] .has-focused-lines .line:not(.has-focus) {
1361
+ /* Focus lines: unfocused rows blur back until the block is hovered.
1362
+ * The renderer marks them \`.dimmed\` (see processCodeBlock) — the upstream
1363
+ * \`:not(.has-focus)\` form never matched this markup. */
1364
+ .bp-doc [class*='language-'] .line.dimmed,
1365
+ .bp-doc pre[data-lang] .line.dimmed {
1207
1366
  filter: blur(0.095rem);
1208
- opacity: 0.4;
1209
- transition: filter 0.35s, opacity 0.35s;
1210
- }
1211
-
1212
- /* VitePress has a second rule that overrides the opacity to 0.7 */
1213
- .bp-doc [class*='language-'] .has-focused-lines .line:not(.has-focus),
1214
- .bp-doc pre[data-lang] .has-focused-lines .line:not(.has-focus) {
1215
1367
  opacity: 0.7;
1216
1368
  transition: filter 0.35s, opacity 0.35s;
1217
1369
  }
1218
1370
 
1219
- .bp-doc [class*='language-']:hover .has-focused-lines .line:not(.has-focus),
1220
- .bp-doc pre[data-lang]:hover .has-focused-lines .line:not(.has-focus) {
1371
+ .bp-doc [class*='language-']:hover .line.dimmed,
1372
+ .bp-doc pre[data-lang]:hover .line.dimmed {
1221
1373
  filter: blur(0);
1222
1374
  opacity: 1;
1223
1375
  }
1224
1376
 
1225
- .bp-doc [class*='language-'] code .diff.remove,
1226
- .bp-doc pre[data-lang] code .diff.remove {
1377
+ /* Both class spellings: \`.diff.remove\` is the upstream form, \`.diff-remove\`
1378
+ * is what processCodeBlock emits. */
1379
+ .bp-doc [class*='language-'] code :is(.diff.remove, .diff-remove),
1380
+ .bp-doc pre[data-lang] code :is(.diff.remove, .diff-remove) {
1227
1381
  background-color: var(--bp-code-line-diff-remove-color);
1228
- opacity: 0.7;
1229
1382
  }
1230
1383
 
1231
- .bp-doc [class*='language-'] code .diff.remove::before,
1232
- .bp-doc pre[data-lang] code .diff.remove::before {
1384
+ .bp-doc [class*='language-'] code :is(.diff.remove, .diff-remove)::before,
1385
+ .bp-doc pre[data-lang] code :is(.diff.remove, .diff-remove)::before {
1233
1386
  content: '-';
1234
1387
  color: var(--bp-code-line-diff-remove-symbol-color);
1235
1388
  }
1236
1389
 
1237
- .bp-doc [class*='language-'] code .diff.add,
1238
- .bp-doc pre[data-lang] code .diff.add {
1390
+ .bp-doc [class*='language-'] code :is(.diff.add, .diff-add),
1391
+ .bp-doc pre[data-lang] code :is(.diff.add, .diff-add) {
1239
1392
  background-color: var(--bp-code-line-diff-add-color);
1240
1393
  }
1241
1394
 
1242
- .bp-doc [class*='language-'] code .diff.add::before,
1243
- .bp-doc pre[data-lang] code .diff.add::before {
1395
+ .bp-doc [class*='language-'] code :is(.diff.add, .diff-add)::before,
1396
+ .bp-doc pre[data-lang] code :is(.diff.add, .diff-add)::before {
1244
1397
  content: '+';
1245
1398
  color: var(--bp-code-line-diff-add-symbol-color);
1246
1399
  }
1247
1400
 
1401
+ /* The +/- glyph lives in the 24px gutter the row bleeds into. */
1402
+ .bp-doc [class*='language-'] code :is(.diff, .diff-add, .diff-remove)::before,
1403
+ .bp-doc pre[data-lang] code :is(.diff, .diff-add, .diff-remove)::before {
1404
+ position: absolute;
1405
+ left: 8px;
1406
+ }
1407
+
1408
+ .bp-doc [class*='language-'] code :is(.has-error, .highlighted.error),
1409
+ .bp-doc pre[data-lang] code :is(.has-error, .highlighted.error) {
1410
+ background-color: var(--bp-code-line-error-color);
1411
+ }
1412
+
1413
+ .bp-doc [class*='language-'] code :is(.has-warning, .highlighted.warning),
1414
+ .bp-doc pre[data-lang] code :is(.has-warning, .highlighted.warning) {
1415
+ background-color: var(--bp-code-line-warning-color);
1416
+ }
1417
+
1248
1418
  /* Line numbers */
1249
1419
  .bp-doc div[class*='language-'].line-numbers-mode,
1250
1420
  .bp-doc pre[data-lang].line-numbers-mode {
@@ -1422,9 +1592,13 @@ const customBlockCSS = `/**
1422
1592
  * -------------------------------------------------------------------------- */
1423
1593
 
1424
1594
  .custom-block {
1425
- border: 1px solid transparent;
1595
+ /* Accent lives on the leading edge only — the other sides stay zero-width so
1596
+ * a variant's \`border-color\` can't paint a full outline. The tint alone is
1597
+ * easy to miss when scanning; a 4px rail reads at any zoom level. */
1598
+ border: 0 solid transparent;
1599
+ border-left-width: 4px;
1426
1600
  border-radius: 8px;
1427
- padding: 16px 16px 8px;
1601
+ padding: 14px 16px;
1428
1602
  line-height: 24px;
1429
1603
  font-size: var(--bp-custom-block-font-size);
1430
1604
  color: var(--bp-c-text-2);
@@ -1590,18 +1764,75 @@ const customBlockCSS = `/**
1590
1764
  }
1591
1765
 
1592
1766
  .custom-block-title {
1593
- font-weight: 600;
1767
+ margin-bottom: 6px;
1768
+ font-weight: 700;
1769
+ font-size: 13px;
1770
+ letter-spacing: 0.03em;
1771
+ text-transform: uppercase;
1772
+ }
1773
+
1774
+ /* The title supplies the block's leading margin, so the first body paragraph
1775
+ * must not add one on top of it. */
1776
+ .custom-block-title + * {
1777
+ margin-top: 0;
1594
1778
  }
1595
1779
 
1596
1780
  .custom-block p + p {
1597
1781
  margin: 8px 0;
1598
1782
  }
1599
1783
 
1600
- .custom-block.details summary {
1601
- margin: 0 0 8px;
1784
+ /* The native disclosure triangle is unstyleable and sits at a different size
1785
+ * and colour in every engine, so it is replaced with a chevron that matches
1786
+ * the rest of the chrome. */
1787
+ .custom-block.details summary,
1788
+ .bp-doc .custom-block.details summary {
1789
+ display: flex;
1790
+ align-items: center;
1791
+ gap: 8px;
1792
+ margin: 0;
1602
1793
  font-weight: 700;
1603
1794
  cursor: pointer;
1604
1795
  user-select: none;
1796
+ list-style: none;
1797
+ }
1798
+
1799
+ .custom-block.details summary::-webkit-details-marker {
1800
+ display: none;
1801
+ }
1802
+
1803
+ .custom-block.details summary::marker {
1804
+ content: '';
1805
+ }
1806
+
1807
+ .custom-block.details summary::before {
1808
+ content: '';
1809
+ flex-shrink: 0;
1810
+ width: 12px;
1811
+ height: 12px;
1812
+ background-color: currentColor;
1813
+ transition: transform 0.2s ease;
1814
+ --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
1815
+ -webkit-mask-image: var(--icon);
1816
+ mask-image: var(--icon);
1817
+ -webkit-mask-size: contain;
1818
+ mask-size: contain;
1819
+ -webkit-mask-repeat: no-repeat;
1820
+ mask-repeat: no-repeat;
1821
+ }
1822
+
1823
+ .custom-block.details[open] summary::before {
1824
+ transform: rotate(90deg);
1825
+ }
1826
+
1827
+ .custom-block.details summary:focus-visible {
1828
+ outline: 2px solid var(--bp-c-brand-1);
1829
+ outline-offset: 2px;
1830
+ border-radius: 3px;
1831
+ }
1832
+
1833
+ /* Body content only gains its top margin once the block is open. */
1834
+ .bp-doc .custom-block.details[open] summary {
1835
+ margin-bottom: 8px;
1605
1836
  }
1606
1837
 
1607
1838
  .custom-block.details summary + p {
@@ -1660,21 +1891,27 @@ const customBlockCSS = `/**
1660
1891
  * GitHub-Flavored Alerts (VitePress style)
1661
1892
  * -------------------------------------------------------------------------- */
1662
1893
 
1894
+ /* Same box treatment as .custom-block — alerts and containers say the same
1895
+ * kind of thing, so they must not look like two unrelated systems. */
1663
1896
  .github-alert {
1664
- border: 1px solid transparent;
1897
+ border: 0 solid transparent;
1898
+ border-left-width: 4px;
1665
1899
  border-radius: 8px;
1666
- padding: 16px 16px 8px;
1900
+ padding: 14px 16px;
1667
1901
  line-height: 24px;
1668
1902
  font-size: var(--bp-custom-block-font-size);
1669
1903
  margin: 16px 0;
1670
1904
  }
1671
1905
 
1672
- .github-alert-title {
1906
+ /* The title is a <p>, so .bp-doc's 16px paragraph margins have to be beaten
1907
+ * on specificity — otherwise the label floats half a line above its body. */
1908
+ .github-alert-title,
1909
+ .bp-doc .github-alert-title {
1673
1910
  display: flex;
1674
1911
  align-items: center;
1675
1912
  gap: 8px;
1913
+ margin: 0 0 6px;
1676
1914
  font-weight: 600;
1677
- margin-bottom: 8px;
1678
1915
  }
1679
1916
 
1680
1917
  .github-alert-icon {
@@ -1687,14 +1924,24 @@ const customBlockCSS = `/**
1687
1924
  line-height: 24px;
1688
1925
  }
1689
1926
 
1690
- .github-alert-content p {
1691
- margin: 8px 0;
1927
+ .github-alert-content p,
1928
+ .bp-doc .github-alert-content p {
1929
+ margin: 0;
1692
1930
  }
1693
1931
 
1694
- .github-alert-content p:first-child {
1932
+ .github-alert-content p + p,
1933
+ .bp-doc .github-alert-content p + p {
1934
+ margin-top: 12px;
1935
+ }
1936
+
1937
+ .bp-doc .github-alert-content > :first-child {
1695
1938
  margin-top: 0;
1696
1939
  }
1697
1940
 
1941
+ .bp-doc .github-alert-content > :last-child {
1942
+ margin-bottom: 0;
1943
+ }
1944
+
1698
1945
  /* Note Alert */
1699
1946
  .github-alert-note {
1700
1947
  border-color: var(--bp-custom-block-note-border);
@@ -1872,11 +2119,24 @@ const codeGroupCSS = `/**
1872
2119
  display: block;
1873
2120
  }
1874
2121
 
1875
- .bp-block,
1876
- .code-group-panel {
2122
+ .bp-block {
1877
2123
  padding: 20px 24px;
1878
2124
  }
1879
2125
 
2126
+ /* The panel is a frame, not a padded box — the code block inside brings its
2127
+ * own padding, background and radius, and stacking the panel's on top of it
2128
+ * rendered a card inside a card with a gap under the tab bar. */
2129
+ .code-group-panel {
2130
+ padding: 0;
2131
+ }
2132
+
2133
+ .bp-doc .code-group-panel > pre,
2134
+ .bp-doc .code-group-panel > div[class*='language-'] {
2135
+ margin: 0;
2136
+ border: none;
2137
+ border-radius: 0;
2138
+ }
2139
+
1880
2140
  /* Code group container */
1881
2141
  .code-group {
1882
2142
  margin: 16px 0;
@@ -1952,9 +2212,15 @@ export const layoutCSS = `/**
1952
2212
  }
1953
2213
 
1954
2214
  .BPNavBarTitle {
1955
- display: inline-flex;
1956
- align-items: center;
2215
+ /* block (not inline-flex) so text-overflow applies: a long site title must
2216
+ * yield instead of sliding underneath the icons on the right. min-width:0
2217
+ * lets the flex item actually shrink below its content width. */
2218
+ display: block;
2219
+ min-width: 0;
2220
+ overflow: hidden;
2221
+ text-overflow: ellipsis;
1957
2222
  font-size: 16px;
2223
+ line-height: 1.5;
1958
2224
  font-weight: 750;
1959
2225
  color: var(--bp-c-text-1);
1960
2226
  white-space: nowrap;
@@ -2055,60 +2321,68 @@ export const layoutCSS = `/**
2055
2321
  background-color: var(--bp-c-bg-soft);
2056
2322
  }
2057
2323
 
2058
- /* Search */
2324
+ /* Search trigger. A button that looks like a field: the real input lives in
2325
+ * the search dialog it opens. */
2059
2326
  .BPNavBarSearch {
2060
- position: relative;
2061
2327
  display: flex;
2062
2328
  align-items: center;
2063
- max-width: 260px;
2064
- width: 100%;
2065
- }
2066
-
2067
- .BPNavBarSearch-icon {
2068
- position: absolute;
2069
- left: 12px;
2070
- width: 16px;
2071
- height: 16px;
2072
- color: var(--bp-c-text-3);
2073
- pointer-events: none;
2074
- }
2075
-
2076
- .BPNavBarSearch-input {
2329
+ gap: 8px;
2077
2330
  width: 100%;
2331
+ max-width: 240px;
2078
2332
  height: 32px;
2079
- padding: 0 48px 0 36px;
2080
- font: inherit;
2333
+ padding: 0 8px 0 10px;
2334
+ font-family: inherit;
2081
2335
  font-size: 13px;
2336
+ text-align: left;
2337
+ color: var(--bp-c-text-3);
2082
2338
  background-color: var(--bp-c-bg-alt);
2083
2339
  border: 1px solid var(--bp-c-divider);
2084
- border-radius: 4px;
2085
- color: var(--bp-c-text-1);
2086
- outline: none;
2087
- transition: border-color 0.25s, background-color 0.25s;
2088
- }
2089
-
2090
- .BPNavBarSearch-input::placeholder {
2091
- color: var(--bp-c-text-3);
2340
+ border-radius: 6px;
2341
+ cursor: pointer;
2342
+ transition: border-color 0.25s, background-color 0.25s, color 0.25s;
2092
2343
  }
2093
2344
 
2094
- .BPNavBarSearch-input:hover,
2095
- .BPNavBarSearch-input:focus {
2345
+ .BPNavBarSearch:hover {
2346
+ color: var(--bp-c-text-2);
2096
2347
  border-color: var(--bp-c-brand-1);
2097
2348
  background-color: var(--bp-c-bg);
2098
2349
  }
2099
2350
 
2351
+ .BPNavBarSearch:focus-visible {
2352
+ outline: 2px solid var(--bp-c-brand-1);
2353
+ outline-offset: 2px;
2354
+ }
2355
+
2356
+ .BPNavBarSearch-icon {
2357
+ width: 15px;
2358
+ height: 15px;
2359
+ flex-shrink: 0;
2360
+ }
2361
+
2362
+ .BPNavBarSearch-label {
2363
+ flex: 1;
2364
+ min-width: 0;
2365
+ overflow: hidden;
2366
+ text-overflow: ellipsis;
2367
+ white-space: nowrap;
2368
+ }
2369
+
2100
2370
  .BPNavBarSearch-kbd {
2101
- position: absolute;
2102
- right: 8px;
2103
- padding: 2px 6px;
2371
+ flex-shrink: 0;
2372
+ padding: 1px 5px;
2104
2373
  font-size: 11px;
2105
2374
  font-weight: 600;
2106
2375
  font-family: inherit;
2376
+ line-height: 1.5;
2107
2377
  color: var(--bp-c-text-3);
2108
2378
  background-color: var(--bp-c-bg);
2109
2379
  border: 1px solid var(--bp-c-divider);
2110
2380
  border-radius: 4px;
2111
- pointer-events: none;
2381
+ }
2382
+
2383
+ .BPSocialLinks-text {
2384
+ font-size: 13px;
2385
+ font-weight: 500;
2112
2386
  }
2113
2387
 
2114
2388
  /* Social/icon links cluster */
@@ -2189,16 +2463,51 @@ export const layoutCSS = `/**
2189
2463
 
2190
2464
  /* Mobile sidebar drawer behaviour */
2191
2465
  @media (max-width: 959px) {
2466
+ /* Collapses to an icon button rather than disappearing: search is the main
2467
+ * way to get around a docs site on a phone, where the sidebar is behind a
2468
+ * drawer and the TOC behind a disclosure. */
2192
2469
  .BPNavBarSearch {
2470
+ width: 36px;
2471
+ max-width: none;
2472
+ padding: 0;
2473
+ justify-content: center;
2474
+ background-color: transparent;
2475
+ border-color: transparent;
2476
+ }
2477
+ .BPNavBarSearch-label,
2478
+ .BPNavBarSearch-kbd {
2193
2479
  display: none;
2194
2480
  }
2481
+ .BPNavBarSearch-icon {
2482
+ width: 18px;
2483
+ height: 18px;
2484
+ }
2195
2485
  .BPSocialLinks {
2196
- padding-left: 12px;
2197
- gap: 8px;
2486
+ /* The divider separates the nav links from the icons — with the links
2487
+ * hidden it is a rule floating against the title, so drop it. */
2488
+ padding-left: 0;
2489
+ border-left: none;
2490
+ gap: 4px;
2198
2491
  }
2199
2492
  .BPNavBarMenu {
2200
2493
  display: none;
2201
2494
  }
2495
+ .BPNavBar {
2496
+ padding: 0 16px;
2497
+ gap: 12px;
2498
+ }
2499
+ .BPNavBarStart {
2500
+ gap: 8px;
2501
+ }
2502
+ .BPNavBarEnd {
2503
+ gap: 4px;
2504
+ }
2505
+ }
2506
+
2507
+ @media (max-width: 419px) {
2508
+ .BPNavBarTitle {
2509
+ font-size: 15px;
2510
+ }
2202
2511
  }
2203
2512
 
2204
2513
  /**
@@ -2206,7 +2515,7 @@ export const layoutCSS = `/**
2206
2515
  * -------------------------------------------------------------------------- */
2207
2516
 
2208
2517
  .BPHero-name {
2209
- font-size: 22px;
2518
+ font-size: clamp(18px, 4vw, 24px);
2210
2519
  font-weight: 700;
2211
2520
  letter-spacing: -0.02em;
2212
2521
  line-height: 1.2;
@@ -2217,36 +2526,29 @@ export const layoutCSS = `/**
2217
2526
  background-clip: text;
2218
2527
  }
2219
2528
 
2529
+ /* Fluid rather than stepped: a fixed 48px headline on a 375px phone puts a
2530
+ * single long word (\`documentation\`) wider than the viewport, and a hard
2531
+ * breakpoint only moves the problem to the widths either side of it. */
2220
2532
  .BPHero-text {
2221
- font-size: 48px;
2533
+ font-size: clamp(30px, 8vw, 56px);
2222
2534
  font-weight: 800;
2223
2535
  letter-spacing: -0.02em;
2224
2536
  line-height: 1.1;
2225
2537
  color: var(--bp-c-text-1);
2226
2538
  margin: 0 0 8px;
2539
+ /* Last resort for a word that still cannot fit at the minimum size. */
2540
+ overflow-wrap: break-word;
2227
2541
  }
2228
2542
 
2229
2543
  .BPHero-tagline {
2230
2544
  max-width: 720px;
2231
- font-size: 18px;
2545
+ font-size: clamp(16px, 2.4vw, 20px);
2232
2546
  font-weight: 400;
2233
2547
  line-height: 1.6;
2234
2548
  color: var(--bp-c-text-2);
2235
2549
  margin: 12px 0 0;
2236
2550
  }
2237
2551
 
2238
- @media (min-width: 960px) {
2239
- .BPHero-name {
2240
- font-size: 24px;
2241
- }
2242
- .BPHero-text {
2243
- font-size: 56px;
2244
- }
2245
- .BPHero-tagline {
2246
- font-size: 20px;
2247
- }
2248
- }
2249
-
2250
2552
  .BPHero-actions {
2251
2553
  display: flex;
2252
2554
  flex-wrap: wrap;
@@ -2386,6 +2688,13 @@ export const layoutCSS = `/**
2386
2688
  * Wrapped as .BPHome-content > .bp-doc.vp-doc.container by markdownToHtml.
2387
2689
  * -------------------------------------------------------------------------- */
2388
2690
 
2691
+ /* The nav is fixed, so the home layout has to reserve its height. Previously
2692
+ * only the hero's own top padding cleared it, which meant any change to that
2693
+ * padding slid the first line of the hero under the bar. */
2694
+ .BPHome {
2695
+ padding-top: var(--bp-nav-height, 64px);
2696
+ }
2697
+
2389
2698
  .BPHome-content {
2390
2699
  padding: 48px 24px 96px;
2391
2700
  }
@@ -2405,6 +2714,17 @@ export const layoutCSS = `/**
2405
2714
  * Inline content — badges, external link icons
2406
2715
  * -------------------------------------------------------------------------- */
2407
2716
 
2717
+ /* The UA default is pure yellow with forced black text, which is jarring in
2718
+ * light mode and unreadable against a dark page. */
2719
+ .bp-doc mark {
2720
+ padding: 1px 3px;
2721
+ border-radius: 3px;
2722
+ background-color: var(--bp-c-warning-soft, rgba(234, 179, 8, 0.28));
2723
+ color: inherit;
2724
+ -webkit-box-decoration-break: clone;
2725
+ box-decoration-break: clone;
2726
+ }
2727
+
2408
2728
  .badge {
2409
2729
  display: inline-block;
2410
2730
  padding: 2px 8px;
@@ -2454,14 +2774,8 @@ export const layoutCSS = `/**
2454
2774
  * -------------------------------------------------------------------------- */
2455
2775
 
2456
2776
  /* Subtle row hover on tables */
2457
- .bp-doc tr:hover {
2458
- background-color: var(--bp-c-bg-soft);
2459
- }
2460
-
2461
- /* Mobile-safe table scroll */
2462
- .bp-doc table {
2463
- width: 100%;
2464
- max-width: 100%;
2777
+ .bp-doc tbody tr:hover {
2778
+ background-color: var(--bp-c-default-soft, var(--bp-c-gray-soft));
2465
2779
  }
2466
2780
 
2467
2781
  /* Slightly stronger blockquote with brand-tinted accent */
@@ -2495,23 +2809,85 @@ export const layoutCSS = `/**
2495
2809
  color: var(--bp-c-brand-1);
2496
2810
  }
2497
2811
 
2812
+ /**
2813
+ * Layout scrollbars
2814
+ * --------------------------------------------------------------------------
2815
+ * The doc layout scrolls in independent panes, so on any platform with
2816
+ * always-visible scrollbars the reader gets full-height grey tracks down the
2817
+ * middle of the page. Thin them to match the code-block treatment. (The TOC
2818
+ * aside hides its scrollbar outright — see page-toc.stx.)
2819
+ */
2820
+
2821
+ .BPSidebar,
2822
+ .BPContent--doc {
2823
+ scrollbar-width: thin;
2824
+ scrollbar-color: var(--bp-c-divider) transparent;
2825
+ }
2826
+
2827
+ .BPSidebar::-webkit-scrollbar,
2828
+ .BPContent--doc::-webkit-scrollbar {
2829
+ width: 8px;
2830
+ height: 8px;
2831
+ }
2832
+
2833
+ .BPSidebar::-webkit-scrollbar-track,
2834
+ .BPContent--doc::-webkit-scrollbar-track {
2835
+ background: transparent;
2836
+ }
2837
+
2838
+ .BPSidebar::-webkit-scrollbar-thumb,
2839
+ .BPContent--doc::-webkit-scrollbar-thumb {
2840
+ background-color: var(--bp-c-divider);
2841
+ border-radius: 4px;
2842
+ }
2843
+
2844
+ .BPSidebar:hover::-webkit-scrollbar-thumb,
2845
+ .BPContent--doc:hover::-webkit-scrollbar-thumb {
2846
+ background-color: var(--bp-c-text-3);
2847
+ }
2848
+
2849
+ /**
2850
+ * Keyboard focus
2851
+ * --------------------------------------------------------------------------
2852
+ * :focus-visible only, so pointer users never see a ring, but every
2853
+ * interactive control in the chrome is reachable and visible by keyboard.
2854
+ */
2855
+
2856
+ .BPNavBarTitle:focus-visible,
2857
+ .BPNavBarMenu a:focus-visible,
2858
+ .BPSocialLinks > a:focus-visible,
2859
+ .BPNavBarHamburger:focus-visible,
2860
+ .theme-toggle:focus-visible,
2861
+ .BPSidebarItem-link:focus-visible,
2862
+ .sidebar-section-toggle:focus-visible,
2863
+ .BPDocAside a:focus-visible,
2864
+ .bp-doc a:focus-visible,
2865
+ .BPButton:focus-visible {
2866
+ outline: 2px solid var(--bp-c-brand-1);
2867
+ outline-offset: 2px;
2868
+ border-radius: 3px;
2869
+ }
2870
+
2498
2871
  /**
2499
2872
  * Mobile nav / sidebar drawer
2500
2873
  * -------------------------------------------------------------------------- */
2501
2874
 
2502
2875
  .BPNavBarHamburger {
2503
2876
  display: none;
2504
- width: 32px;
2505
- height: 32px;
2877
+ /* 40px keeps the hit area at the minimum comfortable touch target even
2878
+ * though the icon itself is 20px. */
2879
+ width: 40px;
2880
+ height: 40px;
2881
+ flex-shrink: 0;
2506
2882
  background: transparent;
2507
2883
  border: none;
2508
2884
  cursor: pointer;
2509
2885
  align-items: center;
2510
2886
  justify-content: center;
2511
2887
  color: var(--bp-c-text-2);
2512
- border-radius: 4px;
2888
+ border-radius: 8px;
2513
2889
  padding: 0;
2514
- margin-left: -4px;
2890
+ margin-left: -8px;
2515
2891
  }
2516
2892
 
2517
2893
  .BPNavBarHamburger:hover {
@@ -2544,7 +2920,13 @@ export const layoutCSS = `/**
2544
2920
 
2545
2921
  .BPSidebar-backdrop {
2546
2922
  position: fixed;
2547
- inset: 0;
2923
+ /* Starts below the nav: the drawer opens under the bar, so scrimming the
2924
+ * bar too dims the very controls (menu button, theme toggle) that stay
2925
+ * live while the drawer is open. */
2926
+ top: var(--bp-nav-height, 64px);
2927
+ right: 0;
2928
+ bottom: 0;
2929
+ left: 0;
2548
2930
  background-color: rgba(0, 0, 0, 0.32);
2549
2931
  opacity: 0;
2550
2932
  pointer-events: none;
@@ -2560,6 +2942,17 @@ export const layoutCSS = `/**
2560
2942
  .BPContent--doc {
2561
2943
  left: 0;
2562
2944
  }
2945
+
2946
+ .BPDoc {
2947
+ padding: 24px 20px 64px;
2948
+ }
2949
+ }
2950
+
2951
+ /* Small phones: reclaim horizontal space from the gutters. */
2952
+ @media (max-width: 419px) {
2953
+ .BPDoc {
2954
+ padding: 20px 16px 56px;
2955
+ }
2563
2956
  }
2564
2957
  `
2565
2958