baseline-foundry 0.1.3 → 0.1.4

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 (43) hide show
  1. package/README.md +568 -552
  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/css-app-tier.js +73 -73
  11. package/dist/css-components/article-pagination.js +140 -140
  12. package/dist/css-components/button-actions.js +161 -161
  13. package/dist/css-components/cards-options.js +176 -176
  14. package/dist/css-components/chip-badge-status.js +158 -158
  15. package/dist/css-components/content-card.js +490 -490
  16. package/dist/css-components/control-row.js +14 -14
  17. package/dist/css-components/cta-figure-aspect.js +120 -120
  18. package/dist/css-components/document-navigation.js +390 -390
  19. package/dist/css-components/editorial-content.js +42 -42
  20. package/dist/css-components/icon.js +72 -72
  21. package/dist/css-components/interactive-feedback.js +217 -217
  22. package/dist/css-components/interactive-tables.js +155 -155
  23. package/dist/css-components/legacy-navigation.d.ts +9 -0
  24. package/dist/css-components/legacy-navigation.js +763 -0
  25. package/dist/css-components/linked-logo-site-layout.js +177 -177
  26. package/dist/css-components/list-tree.js +94 -94
  27. package/dist/css-components/logo-media.js +201 -201
  28. package/dist/css-components/navigation-layout.js +144 -144
  29. package/dist/css-components/panel.js +144 -144
  30. package/dist/css-components/search-box-and-filter.js +263 -263
  31. package/dist/css-components/sites-editorial-ports.js +243 -243
  32. package/dist/css-components/sites-foundation.js +146 -146
  33. package/dist/css-components/sites-rich-lists.js +344 -344
  34. package/dist/css-components/static-content-ports.js +182 -182
  35. package/dist/css-components/tab-section.js +82 -82
  36. package/dist/css-components/table.js +75 -75
  37. package/dist/css-components/tabs-choice-breadcrumbs.js +303 -303
  38. package/dist/css-components/tiered-list-equal-height-row.js +271 -271
  39. package/dist/css-components.js +1791 -2542
  40. package/dist/css-grid.js +172 -172
  41. package/dist/css.js +240 -240
  42. package/docs/publishing.md +30 -13
  43. package/package.json +119 -108
@@ -6,395 +6,395 @@
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-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
+ }
399
399
  `;
400
400
  }