baseline-foundry 0.1.3 → 0.1.5

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 (84) hide show
  1. package/README.md +577 -553
  2. package/config/experiments/ibm-plex-engine-smoke.json +115 -115
  3. package/config/experiments/ubuntu-engine-smoke.json +115 -115
  4. package/config/foundation-theme.json +110 -110
  5. package/config/tiers/app.json +116 -116
  6. package/config/tiers/documentation.json +116 -116
  7. package/config/tiers/editorial.json +116 -116
  8. package/config/tiers/os.json +116 -116
  9. package/dist/baseline-grid-overlay.js +43 -43
  10. package/dist/build.js +4 -4
  11. package/dist/code-snippet.js +1 -1
  12. package/dist/css-app-tier.js +78 -73
  13. package/dist/css-components/article-pagination.js +141 -140
  14. package/dist/css-components/button-actions.js +181 -161
  15. package/dist/css-components/cards-options.js +176 -176
  16. package/dist/css-components/chip-badge-status.d.ts +0 -3
  17. package/dist/css-components/chip-badge-status.js +174 -159
  18. package/dist/css-components/content-card.d.ts +7 -7
  19. package/dist/css-components/content-card.js +498 -497
  20. package/dist/css-components/control-row.d.ts +1 -1
  21. package/dist/css-components/control-row.js +15 -15
  22. package/dist/css-components/cta-figure-aspect.js +120 -120
  23. package/dist/css-components/document-navigation.js +427 -390
  24. package/dist/css-components/editorial-content.js +42 -42
  25. package/dist/css-components/icon.js +72 -72
  26. package/dist/css-components/interactive-feedback.js +239 -217
  27. package/dist/css-components/interactive-tables.js +160 -155
  28. package/dist/css-components/legacy-navigation.d.ts +8 -0
  29. package/dist/css-components/legacy-navigation.js +816 -0
  30. package/dist/css-components/linked-logo-site-layout.d.ts +3 -3
  31. package/dist/css-components/linked-logo-site-layout.js +177 -180
  32. package/dist/css-components/list-tree.js +96 -94
  33. package/dist/css-components/list.js +9 -7
  34. package/dist/css-components/logo-media.d.ts +6 -6
  35. package/dist/css-components/logo-media.js +218 -207
  36. package/dist/css-components/navigation-layout.js +144 -144
  37. package/dist/css-components/panel.js +148 -144
  38. package/dist/css-components/search-box-and-filter.d.ts +0 -1
  39. package/dist/css-components/search-box-and-filter.js +263 -264
  40. package/dist/css-components/sites-editorial-ports.d.ts +3 -4
  41. package/dist/css-components/sites-editorial-ports.js +279 -247
  42. package/dist/css-components/sites-foundation.js +142 -146
  43. package/dist/css-components/sites-rich-lists.d.ts +5 -5
  44. package/dist/css-components/sites-rich-lists.js +339 -349
  45. package/dist/css-components/static-content-ports.d.ts +3 -3
  46. package/dist/css-components/static-content-ports.js +200 -186
  47. package/dist/css-components/tab-section.d.ts +3 -3
  48. package/dist/css-components/tab-section.js +93 -85
  49. package/dist/css-components/table.js +76 -75
  50. package/dist/css-components/tabs-choice-breadcrumbs.js +307 -303
  51. package/dist/css-components/tiered-list-equal-height-row.js +271 -271
  52. package/dist/css-components.js +1881 -2554
  53. package/dist/css-grid.d.ts +1 -1
  54. package/dist/css-grid.js +183 -173
  55. package/dist/css.js +317 -241
  56. package/dist/experiments/ibm-plex-engine-smoke/styles.css +894 -538
  57. package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +2 -2
  58. package/dist/experiments/ibm-plex-engine-smoke/tokens.json +1 -1
  59. package/dist/in-page-navigation.js +1 -1
  60. package/dist/presets/app-tier/styles.css +928 -568
  61. package/dist/presets/app-tier/surfaces.json +17 -17
  62. package/dist/presets/app-tier/tokens.json +7 -7
  63. package/dist/presets/prose/styles.css +919 -562
  64. package/dist/presets/prose/surfaces.json +17 -17
  65. package/dist/presets/prose/tokens.json +1 -1
  66. package/dist/resizable-aside.js +12 -4
  67. package/dist/styles.css +919 -562
  68. package/dist/surfaces.json +17 -17
  69. package/dist/tiers/app/styles.css +928 -568
  70. package/dist/tiers/app/surfaces.json +17 -17
  71. package/dist/tiers/app/tokens.json +7 -7
  72. package/dist/tiers/documentation/styles.css +920 -563
  73. package/dist/tiers/documentation/surfaces.json +17 -17
  74. package/dist/tiers/documentation/tokens.json +2 -2
  75. package/dist/tiers/editorial/styles.css +919 -562
  76. package/dist/tiers/editorial/surfaces.json +17 -17
  77. package/dist/tiers/editorial/tokens.json +1 -1
  78. package/dist/tiers/os/styles.css +925 -568
  79. package/dist/tiers/os/surfaces.json +17 -17
  80. package/dist/tiers/os/tokens.json +7 -7
  81. package/dist/tokens.json +1 -1
  82. package/dist/types.d.ts +1 -1
  83. package/docs/publishing.md +31 -14
  84. package/package.json +119 -108
@@ -6,395 +6,432 @@
6
6
  */
7
7
  export function documentNavigationCss(options) {
8
8
  const { bodyCaseTypeStyles, bodyTypeStyles, headingTypeStyles } = options;
9
- return `/* ------------------------------------------------------------------ */
10
- /* Document navigation (Vanilla parity) */
11
- /* ------------------------------------------------------------------ */
12
-
13
- :where(.bf-theme) :where(.bf-in-page-navigation) {
14
- container-name: bf-in-page-navigation;
15
- container-type: inline-size;
16
- margin-block: 0 var(--bf-section-space-shallow);
17
- min-inline-size: 0;
18
- }
19
-
20
- :where(.bf-theme) :where(.bf-in-page-navigation-nav) {
21
- max-block-size: 100dvb;
22
- min-inline-size: 0;
23
- overflow: auto;
24
- position: sticky;
25
- top: var(--bf-space-3);
26
- }
27
-
28
- :where(.bf-theme) :where(.bf-in-page-navigation-heading) {
29
- ${headingTypeStyles} color: var(--bf-color-text-muted);
30
- display: block;
31
- margin: 0 0 var(--bf-space-1);
32
- padding-block: var(--bf-h6-nudge-start) var(--bf-h6-nudge-end);
33
- }
34
-
35
- :where(.bf-theme) :where(.bf-in-page-navigation-list) {
36
- border-inline-start: var(--bf-bar-thickness) solid var(--bf-color-border-low-contrast);
37
- list-style: none;
38
- margin: 0;
39
- min-inline-size: 0;
40
- padding: 0;
41
- }
42
-
43
- :where(.bf-theme) :where(.bf-in-page-navigation-item) {
44
- margin: 0;
45
- min-inline-size: 0;
46
- padding: 0;
47
- position: relative;
48
- }
49
-
50
- :where(.bf-theme) :where(.bf-in-page-navigation-link) {
51
- ${bodyTypeStyles} color: var(--bf-color-text-muted);
52
- display: -webkit-box;
53
- line-clamp: 2;
54
- margin: 0;
55
- min-inline-size: 0;
56
- overflow: hidden;
57
- overflow-wrap: anywhere;
58
- padding-block: calc(var(--bf-body-nudge-start) + var(--bf-space-half)) calc(var(--bf-body-nudge-end) + var(--bf-space-half));
59
- padding-inline: var(--bf-space-2) 0;
60
- position: relative;
61
- text-decoration: none;
62
- text-overflow: ellipsis;
63
- -webkit-box-orient: vertical;
64
- }
65
-
66
- :where(.bf-theme) :where(.bf-in-page-navigation-link:hover) {
67
- color: var(--bf-color-text-default);
68
- text-decoration: none;
69
- }
70
-
71
- :where(.bf-theme) :where(.bf-in-page-navigation-link:focus:not(:focus-visible)) {
72
- outline: none;
73
- }
74
-
75
- :where(.bf-theme) :where(.bf-in-page-navigation-link:focus-visible) {
76
- outline: 2px solid var(--bf-color-focus);
77
- outline-offset: 2px;
78
- }
79
-
80
- :where(.bf-theme) :where(.bf-in-page-navigation-link.is-active, .bf-in-page-navigation-link[aria-current]) {
81
- color: var(--bf-color-text-default);
82
- font-weight: 600;
83
- }
84
-
85
- :where(.bf-theme) :where(.bf-in-page-navigation-link.is-active, .bf-in-page-navigation-link[aria-current])::before {
86
- background: currentColor;
87
- block-size: 100%;
88
- content: "";
89
- inline-size: var(--bf-bar-thickness);
90
- inset-block: 0;
91
- inset-inline-start: calc(var(--bf-bar-thickness) * -1);
92
- position: absolute;
93
- }
94
-
95
- :where(.bf-theme) :where(.bf-in-page-navigation-list .bf-in-page-navigation-list) {
96
- border: 0;
97
- margin: 0;
98
- padding: 0;
99
- }
100
-
101
- :where(.bf-theme) :where(.bf-in-page-navigation-list .bf-in-page-navigation-list .bf-in-page-navigation-link) {
102
- padding-inline-start: var(--bf-space-4);
103
- }
104
-
105
- :where(.bf-theme) :where(.bf-in-page-navigation-toggle) {
106
- ${bodyCaseTypeStyles} align-items: center;
107
- background: var(--bf-color-background-default);
108
- border: 0;
109
- color: var(--bf-color-text-default);
110
- cursor: pointer;
111
- display: none;
112
- justify-content: center;
113
- margin: 0;
114
- min-block-size: var(--bf-control-box-size-compact);
115
- padding-block: var(--bf-control-block-padding-compact);
116
- padding-inline: var(--bf-space-1);
117
- }
118
-
119
- :where(.bf-theme) :where(.bf-in-page-navigation-toggle:hover) {
120
- background: var(--bf-color-background-hover);
121
- }
122
-
123
- :where(.bf-theme) :where(.bf-in-page-navigation-toggle:focus:not(:focus-visible)) {
124
- outline: none;
125
- }
126
-
127
- :where(.bf-theme) :where(.bf-in-page-navigation-toggle:focus-visible) {
128
- outline: 2px solid var(--bf-color-focus);
129
- outline-offset: -2px;
130
- }
131
-
132
- :where(.bf-theme) :where(.bf-in-page-navigation-toggle > .bf-icon) {
133
- --bf-icon-size: var(--bf-icon-size-default);
134
- }
135
-
136
- @container bf-in-page-navigation (width < 40rem) {
137
- :where(.bf-theme) :where(.bf-in-page-navigation-nav) {
138
- align-items: center;
139
- background: var(--bf-color-background-default);
140
- border-block-end: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
141
- display: grid;
142
- grid-template-columns: minmax(0, 1fr) auto;
143
- max-block-size: none;
144
- overflow: visible;
145
- position: static;
146
- }
147
-
148
- :where(.bf-theme) :where(.bf-in-page-navigation-heading) {
149
- display: none;
150
- }
151
-
152
- :where(.bf-theme) :where(.bf-in-page-navigation-list) {
153
- border: 0;
154
- display: flex;
155
- grid-column: 1;
156
- grid-row: 1;
157
- margin: 0;
158
- overflow-x: auto;
159
- overscroll-behavior-inline: contain;
160
- scrollbar-width: none;
161
- white-space: nowrap;
162
- }
163
-
164
- :where(.bf-theme) :where(.bf-in-page-navigation-list::-webkit-scrollbar) {
165
- display: none;
166
- }
167
-
168
- :where(.bf-theme) :where(.bf-in-page-navigation-item) {
169
- display: inline-block;
170
- flex: 0 0 auto;
171
- max-inline-size: min(50cqi, 18rem);
172
- }
173
-
174
- :where(.bf-theme) :where(.bf-in-page-navigation-link) {
175
- display: block;
176
- overflow: hidden;
177
- padding-block: calc(var(--bf-control-block-padding-compact) - var(--bf-border-width));
178
- padding-inline: var(--bf-space-1);
179
- text-overflow: ellipsis;
180
- white-space: nowrap;
181
- }
182
-
183
- :where(.bf-theme) :where(.bf-in-page-navigation-link.is-active, .bf-in-page-navigation-link[aria-current])::before {
184
- block-size: 50%;
185
- inset-block: 25%;
186
- inset-inline-start: 0;
187
- }
188
-
189
- :where(.bf-theme) :where(.bf-in-page-navigation-list .bf-in-page-navigation-list) {
190
- display: none;
191
- }
192
-
193
- :where(.bf-theme) :where(.bf-in-page-navigation-toggle) {
194
- display: inline-flex;
195
- grid-column: 2;
196
- grid-row: 1;
197
- }
198
-
199
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-nav, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-nav) {
200
- align-items: start;
201
- background: var(--bf-color-background-alt);
202
- max-block-size: 100dvb;
203
- overflow: auto;
204
- position: relative;
205
- }
206
-
207
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-heading, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-heading) {
208
- display: block;
209
- grid-column: 1;
210
- grid-row: 1;
211
- margin: 0;
212
- padding-block: calc(var(--bf-h6-nudge-start) + var(--bf-space-1)) calc(var(--bf-h6-nudge-end) + var(--bf-space-1));
213
- padding-inline: var(--bf-space-2);
214
- }
215
-
216
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded > .bf-in-page-navigation-nav > .bf-in-page-navigation-list, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) > .bf-in-page-navigation-nav > .bf-in-page-navigation-list) {
217
- background: var(--bf-color-background-alt);
218
- border-inline-start: var(--bf-bar-thickness) solid var(--bf-color-border-low-contrast);
219
- display: block;
220
- grid-column: 1 / -1;
221
- grid-row: 2;
222
- /* The mobile nav owns a bottom rule; reserve its thickness within the
223
- list's trailing space so the expanded state keeps its baseline phase. */
224
- margin-block-end: calc(var(--bf-space-2) - var(--bf-border-width));
225
- overflow: visible;
226
- white-space: normal;
227
- }
228
-
229
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-item, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-item) {
230
- display: block;
231
- max-inline-size: none;
232
- }
233
-
234
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-link, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-link) {
235
- display: -webkit-box;
236
- overflow-wrap: anywhere;
237
- padding-block: calc(var(--bf-body-nudge-start) + var(--bf-space-half)) calc(var(--bf-body-nudge-end) + var(--bf-space-half));
238
- padding-inline: var(--bf-space-2) 0;
239
- white-space: normal;
240
- }
241
-
242
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-list .bf-in-page-navigation-list, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-list .bf-in-page-navigation-list) {
243
- display: block;
244
- }
245
-
246
- :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-link.is-active, .bf-in-page-navigation.is-expanded .bf-in-page-navigation-link[aria-current], .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-link.is-active, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-link[aria-current])::before {
247
- block-size: 100%;
248
- inset-block: 0;
249
- inset-inline-start: calc(var(--bf-border-width) * -3);
250
- }
251
- }
252
-
253
- /* ------------------------------------------------------------------ */
254
- /* Reduced top navigation */
255
- /* ------------------------------------------------------------------ */
256
-
257
- /* This is a modifier of BF's existing top-navigation structure, not a
258
- * second navigation API. It retains the existing menu, dropdown and search
259
- * controller contracts while matching Vanilla's reduced chrome. */
260
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) {
261
- background: var(--bf-color-background-alt);
262
- --bf-top-navigation-link-padding-block: var(--bf-control-block-padding-compact);
263
- }
264
-
265
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo-tag) {
266
- display: none;
267
- }
268
-
269
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-row) {
270
- min-block-size: 0;
271
- }
272
-
273
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo) > :where(.bf-top-navigation-link),
274
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-link, .bf-top-navigation-menu-toggle, .bf-top-navigation-search-toggle) {
275
- color: var(--bf-color-text-muted);
276
- font-size: var(--bf-body-font-size);
277
- line-height: var(--bf-body-line-height);
278
- padding-block: var(--bf-top-navigation-link-padding-block);
279
- }
280
-
281
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo.is-canonical-tagged) > :where(.bf-top-navigation-link) {
282
- align-items: center;
283
- padding-inline-start: 0;
284
- }
285
-
286
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo-title) {
287
- font-size: var(--bf-body-font-size);
288
- font-weight: 400;
289
- line-height: var(--bf-body-line-height);
290
- padding-block: 0;
291
- }
292
-
293
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-banner .bf-top-navigation-link, .bf-top-navigation-banner .bf-top-navigation-menu-toggle, .bf-top-navigation-banner .bf-top-navigation-search-toggle) {
294
- color: var(--bf-color-text-muted);
295
- }
296
-
297
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-search-label) {
298
- display: none;
299
- }
300
-
301
- @media (min-width: 64.75rem) {
302
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-dropdown) {
303
- top: calc((var(--bf-top-navigation-link-padding-block) * 2) + var(--bf-body-line-height));
304
- }
305
-
306
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-search) {
307
- background: var(--bf-color-background-alt);
308
- border: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
309
- box-shadow: 0 calc(var(--bf-baseline) * 0.5) calc(var(--bf-baseline) * 2) rgba(0, 0, 0, 0.16);
310
- inset-block-start: 100%;
311
- inset-inline-end: 0;
312
- padding: var(--bf-control-block-padding-compact) var(--bf-top-navigation-link-padding-inline);
313
- position: absolute;
314
- }
315
-
316
- :where(.bf-theme) :where(.bf-top-navigation.is-reduced:has(.bf-top-navigation-search[aria-hidden='false'])) :where(.bf-top-navigation-nav) > :where(.bf-top-navigation-list) {
317
- display: flex;
318
- }
319
- }
320
-
321
- /* ------------------------------------------------------------------ */
322
- /* Table of contents */
323
- /* ------------------------------------------------------------------ */
324
-
325
- :where(.bf-theme) :where(.bf-table-of-contents) {
326
- container-name: bf-table-of-contents;
327
- container-type: inline-size;
328
- margin-block: 0 var(--bf-section-space-shallow);
329
- min-inline-size: 0;
330
- }
331
-
332
- :where(.bf-theme) :where(.bf-table-of-contents-section) {
333
- margin: 0;
334
- min-inline-size: 0;
335
- padding-block-end: var(--bf-space-2);
336
- }
337
-
338
- :where(.bf-theme) :where(.bf-table-of-contents-section + .bf-table-of-contents-section) {
339
- border-block-start: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
340
- padding-block-start: calc(var(--bf-space-2) - var(--bf-border-width));
341
- }
342
-
343
- :where(.bf-theme) :where(.bf-table-of-contents-heading) {
344
- ${headingTypeStyles} color: var(--bf-color-text-muted);
345
- margin: 0 0 var(--bf-space-1);
346
- padding-block: var(--bf-h6-nudge-start) var(--bf-h6-nudge-end);
347
- }
348
-
349
- :where(.bf-theme) :where(.bf-table-of-contents-list) {
350
- list-style: none;
351
- margin: 0;
352
- min-inline-size: 0;
353
- padding: 0;
354
- }
355
-
356
- :where(.bf-theme) :where(.bf-table-of-contents-item) {
357
- margin: 0;
358
- min-inline-size: 0;
359
- padding: 0;
360
- }
361
-
362
- :where(.bf-theme) :where(.bf-table-of-contents-link) {
363
- ${bodyTypeStyles} color: var(--bf-color-link-default);
364
- display: block;
365
- margin: 0;
366
- overflow-wrap: anywhere;
367
- padding-block: calc(var(--bf-body-nudge-start) + var(--bf-space-half)) calc(var(--bf-body-nudge-end) + var(--bf-space-half));
368
- text-decoration: none;
369
- }
370
-
371
- :where(.bf-theme) :where(.bf-table-of-contents-link:hover) {
372
- color: var(--bf-color-text-default);
373
- text-decoration: underline;
374
- }
375
-
376
- :where(.bf-theme) :where(.bf-table-of-contents-link:focus:not(:focus-visible)) {
377
- outline: none;
378
- }
379
-
380
- :where(.bf-theme) :where(.bf-table-of-contents-link:focus-visible) {
381
- outline: 2px solid var(--bf-color-focus);
382
- outline-offset: 2px;
383
- }
384
-
385
- :where(.bf-theme) :where(.bf-table-of-contents-link.is-active, .bf-table-of-contents-link[aria-current]) {
386
- color: var(--bf-color-text-default);
387
- font-weight: 600;
388
- }
389
-
390
- :where(.bf-theme) :where(.bf-table-of-contents-list .bf-table-of-contents-list) {
391
- margin-inline-start: var(--bf-space-2);
392
- }
393
-
394
- @container bf-table-of-contents (width < 20rem) {
395
- :where(.bf-theme) :where(.bf-table-of-contents-list .bf-table-of-contents-list) {
396
- margin-inline-start: var(--bf-space-1);
397
- }
398
- }
9
+ return `/* ------------------------------------------------------------------ */
10
+ /* Document navigation (Vanilla parity) */
11
+ /* ------------------------------------------------------------------ */
12
+
13
+ :where(.bf-theme) :where(.bf-in-page-navigation) {
14
+ container-name: bf-in-page-navigation;
15
+ container-type: inline-size;
16
+ margin: 0;
17
+ min-inline-size: 0;
18
+ }
19
+
20
+ :where(.bf-theme) :where(.bf-in-page-navigation-nav) {
21
+ --bf-stack-space: var(--bf-space-1);
22
+ align-content: start;
23
+ display: grid;
24
+ gap: var(--bf-stack-space);
25
+ max-block-size: 100dvb;
26
+ min-inline-size: 0;
27
+ overflow: auto;
28
+ position: sticky;
29
+ top: var(--bf-space-3);
30
+ }
31
+
32
+ :where(.bf-theme) :where(.bf-in-page-navigation-heading) {
33
+ ${headingTypeStyles} color: var(--bf-color-text-muted);
34
+ display: block;
35
+ margin-block: 0 var(--bf-h6-margin-bottom);
36
+ padding-block-end: 0;
37
+ padding-block-start: var(--bf-h6-nudge-start);
38
+ }
39
+
40
+ :where(.bf-theme) :where(.bf-in-page-navigation-list) {
41
+ --bf-stack-space: var(--bf-space-1);
42
+ align-content: start;
43
+ border-inline-start: var(--bf-bar-thickness) solid var(--bf-color-border-low-contrast);
44
+ display: grid;
45
+ gap: var(--bf-stack-space);
46
+ list-style: none;
47
+ margin: 0;
48
+ min-inline-size: 0;
49
+ padding: 0;
50
+ }
51
+
52
+ :where(.bf-theme) :where(.bf-in-page-navigation-item) {
53
+ align-content: start;
54
+ display: grid;
55
+ gap: var(--bf-stack-space);
56
+ margin: 0;
57
+ min-inline-size: 0;
58
+ padding: 0;
59
+ position: relative;
60
+ }
61
+
62
+ :where(.bf-theme) :where(a.bf-in-page-navigation-link) {
63
+ ${bodyTypeStyles} color: var(--bf-color-text-muted);
64
+ display: -webkit-box;
65
+ line-clamp: 2;
66
+ margin: 0;
67
+ min-inline-size: 0;
68
+ overflow: hidden;
69
+ overflow-wrap: anywhere;
70
+ padding-block: var(--bf-body-nudge-start) var(--bf-body-nudge-end);
71
+ padding-inline: var(--bf-space-2) 0;
72
+ position: relative;
73
+ text-decoration: none;
74
+ text-overflow: ellipsis;
75
+ -webkit-box-orient: vertical;
76
+ }
77
+
78
+ :where(.bf-theme) :where(a.bf-in-page-navigation-link:hover) {
79
+ color: var(--bf-color-text-default);
80
+ text-decoration: none;
81
+ }
82
+
83
+ :where(.bf-theme) :where(.bf-in-page-navigation-link:focus:not(:focus-visible)) {
84
+ outline: none;
85
+ }
86
+
87
+ :where(.bf-theme) :where(.bf-in-page-navigation-link:focus-visible) {
88
+ outline: 0.125rem solid var(--bf-color-focus);
89
+ outline-offset: 0.125rem;
90
+ }
91
+
92
+ :where(.bf-theme) :where(.bf-in-page-navigation-link.is-active, .bf-in-page-navigation-link[aria-current]) {
93
+ color: var(--bf-color-text-default);
94
+ font-weight: 600;
95
+ }
96
+
97
+ :where(.bf-theme) :where(.bf-in-page-navigation-link.is-active, .bf-in-page-navigation-link[aria-current])::before {
98
+ background: currentColor;
99
+ block-size: 100%;
100
+ content: "";
101
+ inline-size: var(--bf-bar-thickness);
102
+ inset-block: 0;
103
+ inset-inline-start: calc(var(--bf-bar-thickness) * -1);
104
+ position: absolute;
105
+ }
106
+
107
+ :where(.bf-theme) :where(.bf-in-page-navigation-list .bf-in-page-navigation-list) {
108
+ border: 0;
109
+ margin: 0;
110
+ padding: 0;
111
+ }
112
+
113
+ :where(.bf-theme) :where(.bf-in-page-navigation-list .bf-in-page-navigation-list .bf-in-page-navigation-link) {
114
+ padding-inline-start: var(--bf-space-4);
115
+ }
116
+
117
+ :where(.bf-theme) :where(.bf-in-page-navigation-toggle) {
118
+ ${bodyCaseTypeStyles} align-items: center;
119
+ background: var(--bf-color-background-default);
120
+ border: 0;
121
+ color: var(--bf-color-text-default);
122
+ cursor: pointer;
123
+ display: none;
124
+ justify-content: center;
125
+ margin: 0;
126
+ min-block-size: var(--bf-control-box-size-compact);
127
+ padding-block: var(--bf-control-block-padding-compact);
128
+ padding-inline: var(--bf-space-1);
129
+ }
130
+
131
+ :where(.bf-theme) :where(.bf-in-page-navigation-toggle:hover) {
132
+ background: var(--bf-color-background-hover);
133
+ }
134
+
135
+ :where(.bf-theme) :where(.bf-in-page-navigation-toggle:focus:not(:focus-visible)) {
136
+ outline: none;
137
+ }
138
+
139
+ :where(.bf-theme) :where(.bf-in-page-navigation-toggle:focus-visible) {
140
+ outline: 0.125rem solid var(--bf-color-focus);
141
+ outline-offset: -0.125rem;
142
+ }
143
+
144
+ :where(.bf-theme) :where(.bf-in-page-navigation-toggle > .bf-icon) {
145
+ --bf-icon-size: var(--bf-icon-size-default);
146
+ }
147
+
148
+ @container bf-in-page-navigation (width < 40rem) {
149
+ :where(.bf-theme) :where(.bf-in-page-navigation-nav) {
150
+ align-items: center;
151
+ background: var(--bf-color-background-default);
152
+ border-block-end: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
153
+ display: grid;
154
+ grid-template-columns: minmax(0, 1fr) auto;
155
+ row-gap: 0;
156
+ max-block-size: none;
157
+ overflow: visible;
158
+ position: static;
159
+ }
160
+
161
+ :where(.bf-theme) :where(.bf-in-page-navigation-heading) {
162
+ display: none;
163
+ }
164
+
165
+ :where(.bf-theme) :where(.bf-in-page-navigation-list) {
166
+ border: 0;
167
+ display: flex;
168
+ gap: 0;
169
+ grid-column: 1;
170
+ grid-row: 1;
171
+ margin: 0;
172
+ overflow-x: auto;
173
+ overscroll-behavior-inline: contain;
174
+ scrollbar-width: none;
175
+ white-space: nowrap;
176
+ }
177
+
178
+ :where(.bf-theme) :where(.bf-in-page-navigation-list::-webkit-scrollbar) {
179
+ display: none;
180
+ }
181
+
182
+ :where(.bf-theme) :where(.bf-in-page-navigation-item) {
183
+ display: inline-block;
184
+ flex: 0 0 auto;
185
+ max-inline-size: min(50cqi, 18rem);
186
+ }
187
+
188
+ :where(.bf-theme) :where(.bf-in-page-navigation-link) {
189
+ display: block;
190
+ overflow: hidden;
191
+ padding-block: calc(var(--bf-control-block-padding-compact) - var(--bf-border-width));
192
+ padding-inline: var(--bf-space-1);
193
+ text-overflow: ellipsis;
194
+ white-space: nowrap;
195
+ }
196
+
197
+ :where(.bf-theme) :where(.bf-in-page-navigation-link.is-active, .bf-in-page-navigation-link[aria-current])::before {
198
+ block-size: 50%;
199
+ inset-block: 25%;
200
+ inset-inline-start: 0;
201
+ }
202
+
203
+ :where(.bf-theme) :where(.bf-in-page-navigation-list .bf-in-page-navigation-list) {
204
+ display: none;
205
+ }
206
+
207
+ :where(.bf-theme) :where(.bf-in-page-navigation-toggle) {
208
+ display: inline-flex;
209
+ grid-column: 2;
210
+ grid-row: 1;
211
+ }
212
+
213
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-nav, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-nav) {
214
+ align-items: start;
215
+ background: var(--bf-color-background-alt);
216
+ max-block-size: 100dvb;
217
+ overflow: auto;
218
+ position: relative;
219
+ }
220
+
221
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-heading, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-heading) {
222
+ display: block;
223
+ grid-column: 1;
224
+ grid-row: 1;
225
+ margin: 0;
226
+ padding-block: calc(var(--bf-h6-nudge-start) + var(--bf-space-1)) calc(var(--bf-h6-nudge-end) + var(--bf-space-1));
227
+ padding-inline: var(--bf-space-2);
228
+ }
229
+
230
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded > .bf-in-page-navigation-nav > .bf-in-page-navigation-list, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) > .bf-in-page-navigation-nav > .bf-in-page-navigation-list) {
231
+ background: var(--bf-color-background-alt);
232
+ border-inline-start: var(--bf-bar-thickness) solid var(--bf-color-border-low-contrast);
233
+ display: grid;
234
+ gap: var(--bf-stack-space);
235
+ grid-column: 1 / -1;
236
+ grid-row: 2;
237
+ /* The mobile nav owns a bottom rule; reserve its thickness within the
238
+ list's trailing space so the expanded state keeps its baseline phase. */
239
+ margin-block-end: calc(var(--bf-space-2) - var(--bf-border-width));
240
+ overflow: visible;
241
+ white-space: normal;
242
+ }
243
+
244
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-item, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-item) {
245
+ display: grid;
246
+ max-inline-size: none;
247
+ }
248
+
249
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-link, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-link) {
250
+ display: -webkit-box;
251
+ overflow-wrap: anywhere;
252
+ padding-block: var(--bf-body-nudge-start) var(--bf-body-nudge-end);
253
+ padding-inline: var(--bf-space-2) 0;
254
+ white-space: normal;
255
+ }
256
+
257
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-list .bf-in-page-navigation-list, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-list .bf-in-page-navigation-list) {
258
+ display: grid;
259
+ gap: var(--bf-stack-space);
260
+ }
261
+
262
+ :where(.bf-theme) :where(.bf-in-page-navigation.is-expanded .bf-in-page-navigation-link.is-active, .bf-in-page-navigation.is-expanded .bf-in-page-navigation-link[aria-current], .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-link.is-active, .bf-in-page-navigation:has(.bf-in-page-navigation-toggle[aria-expanded='true']) .bf-in-page-navigation-link[aria-current])::before {
263
+ block-size: 100%;
264
+ inset-block: 0;
265
+ inset-inline-start: calc(var(--bf-border-width) * -3);
266
+ }
267
+ }
268
+
269
+ /* ------------------------------------------------------------------ */
270
+ /* Reduced top navigation */
271
+ /* ------------------------------------------------------------------ */
272
+
273
+ /* This is a modifier of BF's existing top-navigation structure, not a
274
+ * second navigation API. It retains the existing menu, dropdown and search
275
+ * controller contracts while matching Vanilla's reduced chrome. */
276
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) {
277
+ background: var(--bf-color-background-alt);
278
+ --bf-top-navigation-link-padding-block: var(--bf-control-block-padding-compact);
279
+ }
280
+
281
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo-tag) {
282
+ display: none;
283
+ }
284
+
285
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-row) {
286
+ min-block-size: 0;
287
+ }
288
+
289
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo) > :where(.bf-top-navigation-link),
290
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-link, .bf-top-navigation-menu-toggle, .bf-top-navigation-search-toggle) {
291
+ color: var(--bf-color-text-muted);
292
+ font-size: var(--bf-body-font-size);
293
+ line-height: var(--bf-body-line-height);
294
+ padding-block: var(--bf-top-navigation-link-padding-block);
295
+ }
296
+
297
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo.is-canonical-tagged) > :where(.bf-top-navigation-link) {
298
+ align-items: center;
299
+ padding-inline-start: 0;
300
+ }
301
+
302
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-logo-title) {
303
+ font-size: var(--bf-body-font-size);
304
+ font-weight: 400;
305
+ line-height: var(--bf-body-line-height);
306
+ padding-block: 0;
307
+ }
308
+
309
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-banner .bf-top-navigation-link, .bf-top-navigation-banner .bf-top-navigation-menu-toggle, .bf-top-navigation-banner .bf-top-navigation-search-toggle) {
310
+ color: var(--bf-color-text-muted);
311
+ }
312
+
313
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-search-label) {
314
+ display: none;
315
+ }
316
+
317
+ @media (min-width: 64.75rem) {
318
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-dropdown) {
319
+ top: calc((var(--bf-top-navigation-link-padding-block) * 2) + var(--bf-body-line-height));
320
+ }
321
+
322
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced) :where(.bf-top-navigation-search) {
323
+ background: var(--bf-color-background-alt);
324
+ border: var(--bf-border-width) solid var(--bf-color-border-low-contrast);
325
+ box-shadow: 0 calc(var(--bf-baseline) * 0.5) calc(var(--bf-baseline) * 2) rgba(0, 0, 0, 0.16);
326
+ inset-block-start: 100%;
327
+ inset-inline-end: 0;
328
+ padding: var(--bf-control-block-padding-compact) var(--bf-top-navigation-link-padding-inline);
329
+ position: absolute;
330
+ }
331
+
332
+ :where(.bf-theme) :where(.bf-top-navigation.is-reduced:has(.bf-top-navigation-search[aria-hidden='false'])) :where(.bf-top-navigation-nav) > :where(.bf-top-navigation-list) {
333
+ display: flex;
334
+ }
335
+ }
336
+
337
+ /* ------------------------------------------------------------------ */
338
+ /* Table of contents */
339
+ /* ------------------------------------------------------------------ */
340
+
341
+ :where(.bf-theme) :where(.bf-table-of-contents) {
342
+ --bf-table-of-contents-section-gap: var(--bf-section-space-shallow);
343
+ align-content: start;
344
+ container-name: bf-table-of-contents;
345
+ container-type: inline-size;
346
+ display: grid;
347
+ gap: var(--bf-table-of-contents-section-gap);
348
+ margin: 0;
349
+ min-inline-size: 0;
350
+ }
351
+
352
+ :where(.bf-theme) :where(.bf-table-of-contents-section) {
353
+ --bf-stack-space: 0rem;
354
+ align-content: start;
355
+ display: grid;
356
+ gap: var(--bf-stack-space);
357
+ margin: 0;
358
+ min-inline-size: 0;
359
+ padding: 0;
360
+ position: relative;
361
+ }
362
+
363
+ :where(.bf-theme) :where(.bf-table-of-contents-section + .bf-table-of-contents-section)::before {
364
+ background: var(--bf-color-border-low-contrast);
365
+ block-size: var(--bf-border-width);
366
+ content: "";
367
+ inset-block-start: 0;
368
+ inset-inline: 0;
369
+ position: absolute;
370
+ }
371
+
372
+ :where(.bf-theme) :where(.bf-table-of-contents-heading) {
373
+ color: var(--bf-color-text-default);
374
+ margin: 0;
375
+ padding-block-end: 0;
376
+ }
377
+
378
+ :where(.bf-theme) :where(.bf-table-of-contents-list) {
379
+ --bf-stack-space: 0rem;
380
+ align-content: start;
381
+ display: grid;
382
+ gap: var(--bf-stack-space);
383
+ list-style: none;
384
+ margin: 0;
385
+ min-inline-size: 0;
386
+ padding: 0;
387
+ }
388
+
389
+ :where(.bf-theme) :where(.bf-table-of-contents-item) {
390
+ align-content: start;
391
+ display: grid;
392
+ gap: var(--bf-stack-space);
393
+ margin: 0;
394
+ min-inline-size: 0;
395
+ padding: 0;
396
+ }
397
+
398
+ :where(.bf-theme) :where(a.bf-table-of-contents-link) {
399
+ ${bodyTypeStyles} border-block: var(--bf-border-width) solid transparent;
400
+ color: var(--bf-color-link-default);
401
+ display: block;
402
+ margin: 0 0 var(--bf-single-line-row-margin-block-end);
403
+ overflow-wrap: anywhere;
404
+ padding-block: var(--bf-single-line-row-padding-block);
405
+ text-decoration: none;
406
+ }
407
+
408
+ :where(.bf-theme) :where(a.bf-table-of-contents-link:hover) {
409
+ color: var(--bf-color-text-default);
410
+ text-decoration: underline;
411
+ }
412
+
413
+ :where(.bf-theme) :where(.bf-table-of-contents-link:focus:not(:focus-visible)) {
414
+ outline: none;
415
+ }
416
+
417
+ :where(.bf-theme) :where(.bf-table-of-contents-link:focus-visible) {
418
+ outline: 0.125rem solid var(--bf-color-focus);
419
+ outline-offset: 0.125rem;
420
+ }
421
+
422
+ :where(.bf-theme) :where(.bf-table-of-contents-link.is-active, .bf-table-of-contents-link[aria-current]) {
423
+ color: var(--bf-color-text-default);
424
+ font-weight: 600;
425
+ }
426
+
427
+ :where(.bf-theme) :where(.bf-table-of-contents-list .bf-table-of-contents-list) {
428
+ margin-inline-start: var(--bf-space-2);
429
+ }
430
+
431
+ @container bf-table-of-contents (width < 20rem) {
432
+ :where(.bf-theme) :where(.bf-table-of-contents-list .bf-table-of-contents-list) {
433
+ margin-inline-start: var(--bf-space-1);
434
+ }
435
+ }
399
436
  `;
400
437
  }