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
package/dist/css.js CHANGED
@@ -148,6 +148,20 @@ export function generateFoundryCss(tokens, options = {}) {
148
148
  const roleRules = Object.entries(tokens.roles)
149
149
  .map(([roleName, token]) => textRule(roleName, selectorsForRole(roleName), token, baselineUnit, EXTRA_STYLES_BY_ROLE[roleName] ?? ""))
150
150
  .join("\n");
151
+ const semanticMetricFlushSelectors = Object.keys(tokens.roles).flatMap(roleName => {
152
+ if (roleName === "body")
153
+ return ["p"];
154
+ if (/^h[1-6]$/.test(roleName))
155
+ return [roleName];
156
+ if (roleName === "meta")
157
+ return ["figcaption"];
158
+ return [];
159
+ });
160
+ const metricFlushTextSelectors = [...new Set([
161
+ "blockquote",
162
+ ...semanticMetricFlushSelectors,
163
+ ...Object.keys(tokens.roles).map(roleName => `.bf-${roleName}`)
164
+ ])].join(", ");
151
165
  const capEngineDemo = `/* DEMO ONLY — Cap-derived nudges are unreliable (ascender ≠ cap height).\n The approximation (line-height + 1cap) / 2 drifts at larger sizes.\n Kept as a reference for why metrics-derived nudges are used instead. */\n` +
152
166
  Object.entries(tokens.roles)
153
167
  .map(([roleName, token]) => capEngineDemoRule(selectorsForRole(roleName), token))
@@ -164,53 +178,53 @@ export function generateFoundryCss(tokens, options = {}) {
164
178
  if (!body) {
165
179
  throw new Error("Theme tokens require a body role.");
166
180
  }
167
- return `${fontFaces}${fontFaces ? "\n" : ""}${generateBaselineGridOverlayCss({ baselineUnit: tokens.baselineUnit })}
168
-
169
- ${themeSurfaceRule(":where(.bf-theme)", tokens)}
170
- ${scopedThemeCss}
171
-
172
- :where(.bf-theme) {
173
- ${vanillaThemeColorVars("light")}${foundryThemeRootColorVars("light")}
174
- background: var(--bf-color-bg);
175
- color: var(--bf-color-text);
176
- font-family: var(--bf-body-font-family, ${body.fontStack});
177
- font-size: var(--bf-body-font-size, ${body.fontSize});
178
- font-style: var(--bf-body-font-style, ${body.fontStyle ?? "normal"});
179
- font-weight: var(--bf-body-font-weight, ${body.fontWeight ?? 400});
180
- line-height: var(--bf-body-line-height, ${body.lineHeight});
181
- }
182
-
183
- :where(.bf-theme.is-dark) {
184
- ${vanillaThemeColorVars("dark")}${foundryThemeRootColorVars("dark")}
185
- color-scheme: dark;
186
- }
187
-
188
- :where(.bf-theme.is-light) {
189
- color-scheme: light;
190
- }
191
-
192
- :where(.bf-theme),
193
- :where(.bf-theme) * {
194
- box-sizing: border-box;
195
- }
196
-
197
- ${generateBaselineGridThemeOverrideCss()}
198
-
199
- :where(.bf-theme) :where(h1, h2, h3, h4, h5, h6, p, blockquote, figure, ul, ol, dl, pre) {
200
- margin: 0;
201
- }
202
-
203
- :where(.bf-theme) :where(img, picture, svg, video) {
204
- block-size: auto;
205
- display: block;
206
- inline-size: auto;
207
- max-inline-size: 100%;
208
- }
209
-
181
+ return `${fontFaces}${fontFaces ? "\n" : ""}${generateBaselineGridOverlayCss({ baselineUnit: tokens.baselineUnit })}
182
+
183
+ ${themeSurfaceRule(":where(.bf-theme)", tokens)}
184
+ ${scopedThemeCss}
185
+
186
+ :where(.bf-theme) {
187
+ ${vanillaThemeColorVars("light")}${foundryThemeRootColorVars("light")}
188
+ background: var(--bf-color-bg);
189
+ color: var(--bf-color-text);
190
+ font-family: var(--bf-body-font-family, ${body.fontStack});
191
+ font-size: var(--bf-body-font-size, ${body.fontSize});
192
+ font-style: var(--bf-body-font-style, ${body.fontStyle ?? "normal"});
193
+ font-weight: var(--bf-body-font-weight, ${body.fontWeight ?? 400});
194
+ line-height: var(--bf-body-line-height, ${body.lineHeight});
195
+ }
196
+
197
+ :where(.bf-theme.is-dark) {
198
+ ${vanillaThemeColorVars("dark")}${foundryThemeRootColorVars("dark")}
199
+ color-scheme: dark;
200
+ }
201
+
202
+ :where(.bf-theme.is-light) {
203
+ color-scheme: light;
204
+ }
205
+
206
+ :where(.bf-theme),
207
+ :where(.bf-theme) * {
208
+ box-sizing: border-box;
209
+ }
210
+
211
+ ${generateBaselineGridThemeOverrideCss()}
212
+
213
+ :where(.bf-theme) :where(h1, h2, h3, h4, h5, h6, p, blockquote, figure, ul, ol, dl, pre) {
214
+ margin: 0;
215
+ }
216
+
217
+ :where(.bf-theme) :where(img, picture, svg, video) {
218
+ block-size: auto;
219
+ display: block;
220
+ inline-size: auto;
221
+ max-inline-size: 100%;
222
+ }
223
+
210
224
  :where(.bf-theme) :where(a) {
211
225
  color: var(--bf-color-link);
212
226
  text-decoration: none;
213
- text-decoration-thickness: 1px;
227
+ text-decoration-thickness: 0.0625rem;
214
228
  text-underline-offset: 0.12em;
215
229
  }
216
230
 
@@ -221,211 +235,273 @@ ${generateBaselineGridThemeOverrideCss()}
221
235
  :where(.bf-theme) :where(a:visited) {
222
236
  color: var(--bf-color-link-visited);
223
237
  }
224
-
225
- :where(.bf-theme) :where(a:focus-visible) {
226
- outline: 2px solid var(--bf-color-focus);
227
- outline-offset: 2px;
228
- }
229
-
230
- :where(.bf-theme) :where(code) {
231
- font-family: "Ubuntu Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
232
- font-size: 0.95em;
233
- }
234
-
235
- :where(.bf-theme) :where(.bf-page) {
236
- margin-inline: auto;
237
- max-inline-size: var(--bf-content-max-width);
238
- padding-inline: max(var(--bf-page-margin), var(--bf-content-padding-inline));
239
- }
240
-
241
- :where(.bf-theme) :where(.bf-page.is-fill) {
242
- min-block-size: 100vh;
243
- padding-block-end: var(--bf-section-space);
244
- }
245
-
246
- :where(.bf-theme) :where(.bf-section) {
247
- margin-block-end: 0;
248
- }
249
-
250
- :where(.bf-theme) :where(.bf-section.is-shallow) {
251
- margin-block-end: 0;
252
- }
253
-
254
- :where(.bf-theme) :where(.bf-section.is-deep) {
255
- margin-block-end: 0;
256
- }
257
-
258
- :where(.bf-theme) :where(.bf-strip) {
259
- padding-block-end: var(--bf-strip-space);
260
- }
261
-
262
- :where(.bf-theme) :where(.bf-fixed-width, .bf-measure) {
263
- inline-size: min(100%, var(--bf-measure));
264
- }
265
-
266
- :where(.bf-theme) :where(.bf-inline-size) {
267
- --bf-inline-size: 18rem;
268
- flex: 0 1 var(--bf-inline-size);
269
- inline-size: min(100%, var(--bf-inline-size));
270
- min-inline-size: min(100%, var(--bf-inline-size));
271
- }
272
-
273
- :where(.bf-theme) :where(.bf-inline-size.is-compact) {
274
- --bf-inline-size: 12rem;
275
- }
276
-
277
- :where(.bf-theme) :where(.bf-inline-size.is-regular) {
278
- --bf-inline-size: 18rem;
279
- }
280
-
281
- :where(.bf-theme) :where(.bf-inline-size.is-medium) {
282
- --bf-inline-size: 20rem;
283
- }
284
-
285
- :where(.bf-theme) :where(.bf-inline-size.is-wide) {
286
- --bf-inline-size: 24rem;
287
- }
288
-
289
- :where(.bf-theme) :where(.bf-inline-size.is-x-wide) {
290
- --bf-inline-size: 28rem;
291
- }
292
-
293
- :where(.bf-theme) :where(.bf-stage-shell) {
294
- --bf-stage-shell-gap: var(--bf-space-3);
295
- align-content: center;
296
- align-items: center;
297
- display: grid;
298
- gap: var(--bf-stage-shell-gap);
299
- justify-items: center;
300
- min-block-size: 100%;
301
- min-inline-size: 0;
302
- padding-block: var(--bf-space-4);
303
- }
304
-
305
- :where(.bf-theme) :where(.bf-stage-shell.is-tight) {
306
- --bf-stage-shell-gap: var(--bf-space-2);
307
- }
308
-
309
- :where(.bf-theme) :where(.bf-stage-shell.is-loose) {
310
- --bf-stage-shell-gap: var(--bf-space-4);
311
- }
312
-
238
+
239
+ :where(.bf-theme) :where(a:focus-visible) {
240
+ outline: 0.125rem solid var(--bf-color-focus);
241
+ outline-offset: 0.125rem;
242
+ }
243
+
244
+ /* Standalone anchors need the same metric-owned text box as adjacent body
245
+ * controls. Raw anchors remain inline so prose links still participate in the
246
+ * surrounding line box. */
247
+ :where(.bf-theme) :where(a.bf-text-link) {
248
+ display: inline-block;
249
+ font-family: var(--bf-body-font-family);
250
+ font-size: var(--bf-body-font-size);
251
+ font-style: var(--bf-body-font-style);
252
+ font-weight: var(--bf-body-font-weight);
253
+ line-height: var(--bf-body-line-height);
254
+ margin-block: 0 var(--bf-body-margin-bottom);
255
+ padding-block: var(--bf-body-nudge-start) 0;
256
+ }
257
+
258
+ :where(.bf-theme) :where(code) {
259
+ font-family: "Ubuntu Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
260
+ font-size: 0.95em;
261
+ }
262
+
263
+ :where(.bf-theme) :where(.bf-page) {
264
+ margin-inline: auto;
265
+ max-inline-size: var(--bf-content-max-width);
266
+ padding-inline: var(--bf-page-margin);
267
+ }
268
+
269
+ :where(.bf-theme) :where(.bf-page.is-fill) {
270
+ min-block-size: 100vh;
271
+ padding-block-end: var(--bf-section-space);
272
+ }
273
+
274
+ :where(.bf-theme) :where(.bf-section) {
275
+ margin-block-end: 0;
276
+ }
277
+
278
+ :where(.bf-theme) :where(.bf-section.is-shallow) {
279
+ margin-block-end: 0;
280
+ }
281
+
282
+ :where(.bf-theme) :where(.bf-section.is-deep) {
283
+ margin-block-end: 0;
284
+ }
285
+
286
+ :where(.bf-theme) :where(.bf-strip) {
287
+ padding-block-end: var(--bf-strip-space);
288
+ }
289
+
290
+ :where(.bf-theme) :where(.bf-fixed-width, .bf-measure) {
291
+ inline-size: min(100%, var(--bf-measure));
292
+ }
293
+
294
+ :where(.bf-theme) :where(.bf-inline-size) {
295
+ --bf-inline-size: 18rem;
296
+ flex: 0 1 var(--bf-inline-size);
297
+ inline-size: min(100%, var(--bf-inline-size));
298
+ min-inline-size: min(100%, var(--bf-inline-size));
299
+ }
300
+
301
+ :where(.bf-theme) :where(.bf-inline-size.is-compact) {
302
+ --bf-inline-size: 12rem;
303
+ }
304
+
305
+ :where(.bf-theme) :where(.bf-inline-size.is-regular) {
306
+ --bf-inline-size: 18rem;
307
+ }
308
+
309
+ :where(.bf-theme) :where(.bf-inline-size.is-medium) {
310
+ --bf-inline-size: 20rem;
311
+ }
312
+
313
+ :where(.bf-theme) :where(.bf-inline-size.is-wide) {
314
+ --bf-inline-size: 24rem;
315
+ }
316
+
317
+ :where(.bf-theme) :where(.bf-inline-size.is-x-wide) {
318
+ --bf-inline-size: 28rem;
319
+ }
320
+
321
+ :where(.bf-theme) :where(.bf-stage-shell) {
322
+ --bf-stage-shell-gap: var(--bf-space-3);
323
+ align-content: center;
324
+ align-items: center;
325
+ display: grid;
326
+ gap: var(--bf-stage-shell-gap);
327
+ justify-items: center;
328
+ min-block-size: 100%;
329
+ min-inline-size: 0;
330
+ padding-block: var(--bf-space-4);
331
+ }
332
+
333
+ :where(.bf-theme) :where(.bf-stage-shell.is-tight) {
334
+ --bf-stage-shell-gap: var(--bf-space-2);
335
+ }
336
+
337
+ :where(.bf-theme) :where(.bf-stage-shell.is-loose) {
338
+ --bf-stage-shell-gap: var(--bf-space-4);
339
+ }
340
+
313
341
  :where(.bf-theme) :where(.bf-stack) {
314
342
  --bf-stack-space: var(--bf-section-space-shallow);
315
343
  align-content: start;
316
344
  display: grid;
317
- gap: var(--bf-stack-space);
318
- }
319
-
320
- :where(.bf-theme) :where(.bf-stack.is-flush) {
321
- --bf-stack-space: 0px;
322
- }
323
-
324
- :where(.bf-theme) :where(.bf-stack.is-extra-dense) {
325
- --bf-stack-space: var(--bf-space-half);
326
- }
327
-
328
- :where(.bf-theme) :where(.bf-stack.is-dense) {
329
- --bf-stack-space: var(--bf-space-1);
330
- }
331
-
332
- :where(.bf-theme) :where(.bf-stack.is-loose) {
333
- --bf-stack-space: var(--bf-space-2);
334
- }
335
-
336
- :where(.bf-theme) :where(.bf-stack.is-section-shallow) {
337
- --bf-stack-space: var(--bf-section-space-shallow);
338
- }
339
-
340
- :where(.bf-theme) :where(.bf-stack.is-section) {
341
- --bf-stack-space: var(--bf-section-space);
342
- }
343
-
345
+ gap: var(--bf-stack-space);
346
+ }
347
+
348
+ :where(.bf-theme) :where(.bf-stack.is-flush) {
349
+ --bf-stack-space: 0rem;
350
+ }
351
+
352
+ /* A metric-flush stack is an explicit relationship between adjacent text
353
+ * roles. It retains the outer role nudges while cancelling only the preceding
354
+ * end compensation and following start nudge; no guessed negative gap is used. */
355
+ :where(.bf-theme) :where(.bf-stack.is-metric-flush) {
356
+ --bf-stack-space: 0rem;
357
+ }
358
+
359
+ :where(.bf-theme) :where(.bf-stack.is-extra-dense) {
360
+ --bf-stack-space: var(--bf-space-half);
361
+ }
362
+
363
+ :where(.bf-theme) :where(.bf-stack.is-dense) {
364
+ --bf-stack-space: var(--bf-space-1);
365
+ }
366
+
367
+ :where(.bf-theme) :where(.bf-stack.is-loose) {
368
+ --bf-stack-space: var(--bf-space-2);
369
+ }
370
+
371
+ :where(.bf-theme) :where(.bf-stack.is-section-shallow) {
372
+ --bf-stack-space: var(--bf-section-space-shallow);
373
+ }
374
+
375
+ :where(.bf-theme) :where(.bf-stack.is-section) {
376
+ --bf-stack-space: var(--bf-section-space);
377
+ }
378
+
344
379
  :where(.bf-theme) :where(.bf-stack.is-section-deep) {
345
380
  --bf-stack-space: var(--bf-section-space-deep);
346
381
  }
347
382
 
348
383
  :where(.bf-theme) :where(.bf-cluster) {
349
- align-items: flex-start;
350
- display: flex;
351
- flex-wrap: wrap;
352
- gap: var(--bf-space-2);
353
- }
354
-
355
- :where(.bf-theme) :where(.bf-cluster.is-split) {
356
- justify-content: space-between;
357
- }
358
-
359
- :where(.bf-theme) :where(.bf-prose) {
360
- display: grid;
361
- gap: var(--bf-section-space-shallow);
362
- inline-size: min(100%, var(--bf-measure));
363
- }
364
-
365
- ${roleRules}
366
-
367
- ${capEngineDemo}
368
-
369
- :where(.bf-theme) :where(ul, ol) {
370
- margin-bottom: 0;
371
- }
372
-
373
- :where(.bf-theme) :where(.bf-prose ul, .bf-prose ol) {
374
- padding-inline-start: var(--bf-space-4);
375
- }
376
-
377
- :where(.bf-theme) :where(.bf-prose li) {
378
- margin: 0 0 ${roleMarginBottomVar("body", baselineCompensation(body.nudgeTop, baselineUnit))};
379
- padding-block-end: 0rem;
380
- padding-block-start: ${roleNudgeStartVar("body", body.nudgeTop)};
381
- }
382
-
383
- :where(.bf-theme) :where(.bf-prose blockquote) {
384
- border-inline-start: 1px solid var(--bf-color-rule);
385
- color: var(--bf-color-muted);
386
- font-family: ${roleFontFamilyVar("body", body.fontStack)};
387
- font-size: ${roleFontSizeVar("body", body.fontSize)};
388
- font-style: ${roleFontStyleVar("body", body.fontStyle ?? "normal")};
389
- font-weight: ${roleFontWeightVar("body", body.fontWeight ?? 400)};
390
- line-height: ${roleLineHeightVar("body", body.lineHeight)};
391
- margin-bottom: ${roleMarginBottomVar("body", baselineCompensation(body.nudgeTop, baselineUnit))};
392
- max-inline-size: calc(var(--bf-measure) + var(--bf-space-4));
393
- padding-block-end: 0rem;
394
- padding-block-start: ${roleNudgeStartVar("body", body.nudgeTop)};
395
- padding-inline-start: var(--bf-space-3);
396
- }
397
-
398
- :where(.bf-theme) :where(.bf-rule, .bf-prose hr) {
399
- background: var(--bf-color-rule);
400
- block-size: 1px;
401
- border: 0;
402
- inline-size: 100%;
403
- /* Reserve one half-rem rhythm step after the rule, including its */
404
- /* thickness, so borderless content does not touch the divider. */
405
- margin: 0 0 calc(0.5rem - 1px);
406
- }
407
-
408
- /* Highlight rules share the same scalable emphasis-bar geometry as active
409
- * navigation, tabs, notifications, and document-navigation markers. */
410
- :where(.bf-theme) :where(.bf-rule.is-highlighted, .bf-prose hr.is-highlighted) {
411
- block-size: var(--bf-bar-thickness);
412
- margin-block-end: calc(0.5rem - var(--bf-bar-thickness));
413
- }
414
-
415
- :where(.bf-theme) :where(.bf-token-row) {
416
- border-top: 1px solid var(--bf-color-rule);
417
- display: grid;
418
- gap: var(--bf-space-1);
419
- padding-top: var(--bf-space-2);
420
- }
421
-
422
- :where(.bf-theme) :where(.bf-token-row:first-child) {
423
- border-top: 0;
424
- padding-top: 0;
425
- }
426
-
427
- ${componentsCss(tokens, themeSurfaces)}
428
-
429
- ${gridCss()}${presetCss}
384
+ --bf-cluster-space: var(--bf-space-2);
385
+ align-items: flex-start;
386
+ display: flex;
387
+ flex-wrap: wrap;
388
+ gap: var(--bf-cluster-space);
389
+ }
390
+
391
+ :where(.bf-theme) :where(.bf-cluster.is-dense) {
392
+ --bf-cluster-space: var(--bf-space-1);
393
+ }
394
+
395
+ :where(.bf-theme) :where(.bf-cluster.is-nowrap) {
396
+ flex-wrap: nowrap;
397
+ }
398
+
399
+ :where(.bf-theme) :where(.bf-cluster.is-split) {
400
+ justify-content: space-between;
401
+ }
402
+
403
+ :where(.bf-theme) :where(.bf-prose) {
404
+ display: grid;
405
+ gap: var(--bf-section-space-shallow);
406
+ inline-size: min(100%, var(--bf-measure));
407
+ }
408
+
409
+ ${roleRules}
410
+
411
+ :where(.bf-theme) .bf-stack.is-metric-flush > :where(${metricFlushTextSelectors}):has(+ :where(${metricFlushTextSelectors})) {
412
+ margin-block-end: 0;
413
+ }
414
+
415
+ :where(.bf-theme) .bf-stack.is-metric-flush > :where(${metricFlushTextSelectors}) + :where(${metricFlushTextSelectors}) {
416
+ padding-block-start: 0;
417
+ }
418
+
419
+ ${capEngineDemo}
420
+
421
+ :where(.bf-theme) :where(ul, ol) {
422
+ margin-bottom: 0;
423
+ padding-block-end: 0;
424
+ }
425
+
426
+ :where(.bf-theme) :where(.bf-prose ol) {
427
+ padding-inline-start: calc(var(--bf-leading-mark-group-inset) + var(--bf-leading-mark-offset) - (var(--bf-leading-mark-size) * 0.5));
428
+ }
429
+
430
+ :where(.bf-theme) :where(.bf-prose ol > li) {
431
+ padding-inline-start: calc(var(--bf-leading-mark-size) * 0.5);
432
+ }
433
+
434
+ :where(.bf-theme) :where(.bf-prose ul) {
435
+ list-style: none;
436
+ padding-inline-start: var(--bf-leading-mark-group-inset);
437
+ }
438
+
439
+ :where(.bf-theme) :where(.bf-prose ul > li) {
440
+ padding-inline-start: var(--bf-leading-mark-offset);
441
+ position: relative;
442
+ }
443
+
444
+ :where(.bf-theme) :where(.bf-prose ul > li)::before {
445
+ background: currentColor;
446
+ block-size: var(--bf-list-marker-dot-size);
447
+ border-radius: 50%;
448
+ content: "";
449
+ inline-size: var(--bf-list-marker-dot-size);
450
+ inset-block-start: calc(var(--bf-tick-box-offset) + ((var(--bf-leading-mark-size) - var(--bf-list-marker-dot-size)) * 0.5));
451
+ inset-inline-start: calc((var(--bf-leading-mark-size) - var(--bf-list-marker-dot-size)) * 0.5);
452
+ position: absolute;
453
+ }
454
+
455
+ :where(.bf-theme) :where(.bf-prose li) {
456
+ margin: 0 0 ${roleMarginBottomVar("body", baselineCompensation(body.nudgeTop, baselineUnit))};
457
+ padding-block-end: 0rem;
458
+ padding-block-start: ${roleNudgeStartVar("body", body.nudgeTop)};
459
+ }
460
+
461
+ :where(.bf-theme) :where(.bf-prose blockquote) {
462
+ color: var(--bf-color-text-default);
463
+ font-family: ${roleFontFamilyVar("body", body.fontStack)};
464
+ font-size: ${roleFontSizeVar("body", body.fontSize)};
465
+ font-style: ${roleFontStyleVar("body", body.fontStyle ?? "normal")};
466
+ font-weight: ${roleFontWeightVar("body", body.fontWeight ?? 400)};
467
+ line-height: ${roleLineHeightVar("body", body.lineHeight)};
468
+ margin-bottom: ${roleMarginBottomVar("body", baselineCompensation(body.nudgeTop, baselineUnit))};
469
+ max-inline-size: var(--bf-measure);
470
+ padding-block-end: 0rem;
471
+ padding-block-start: ${roleNudgeStartVar("body", body.nudgeTop)};
472
+ }
473
+
474
+ :where(.bf-theme) :where(hr) {
475
+ background: var(--bf-color-rule);
476
+ block-size: 0.0625rem;
477
+ border: 0;
478
+ inline-size: 100%;
479
+ /* Reserve one half-rem rhythm step after the rule, including its */
480
+ /* thickness, so borderless content does not touch the divider. */
481
+ margin: 0 0 calc(0.5rem - 0.0625rem);
482
+ }
483
+
484
+ /* Highlight rules share the same scalable emphasis-bar geometry as active
485
+ * navigation, tabs, notifications, and document-navigation markers. */
486
+ :where(.bf-theme) :where(hr.is-highlighted) {
487
+ block-size: var(--bf-bar-thickness);
488
+ margin-block-end: calc(0.5rem - var(--bf-bar-thickness));
489
+ }
490
+
491
+ :where(.bf-theme) :where(.bf-token-row) {
492
+ border-top: 0.0625rem solid var(--bf-color-rule);
493
+ display: grid;
494
+ gap: var(--bf-space-1);
495
+ padding-top: var(--bf-space-2);
496
+ }
497
+
498
+ :where(.bf-theme) :where(.bf-token-row:first-child) {
499
+ border-top: 0;
500
+ padding-top: 0;
501
+ }
502
+
503
+ ${componentsCss(tokens, themeSurfaces)}
504
+
505
+ ${gridCss(appScopes)}${presetCss}
430
506
  `;
431
507
  }