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.
- package/README.md +577 -553
- package/config/experiments/ibm-plex-engine-smoke.json +115 -115
- package/config/experiments/ubuntu-engine-smoke.json +115 -115
- package/config/foundation-theme.json +110 -110
- package/config/tiers/app.json +116 -116
- package/config/tiers/documentation.json +116 -116
- package/config/tiers/editorial.json +116 -116
- package/config/tiers/os.json +116 -116
- package/dist/baseline-grid-overlay.js +43 -43
- package/dist/build.js +4 -4
- package/dist/code-snippet.js +1 -1
- package/dist/css-app-tier.js +78 -73
- package/dist/css-components/article-pagination.js +141 -140
- package/dist/css-components/button-actions.js +181 -161
- package/dist/css-components/cards-options.js +176 -176
- package/dist/css-components/chip-badge-status.d.ts +0 -3
- package/dist/css-components/chip-badge-status.js +174 -159
- package/dist/css-components/content-card.d.ts +7 -7
- package/dist/css-components/content-card.js +498 -497
- package/dist/css-components/control-row.d.ts +1 -1
- package/dist/css-components/control-row.js +15 -15
- package/dist/css-components/cta-figure-aspect.js +120 -120
- package/dist/css-components/document-navigation.js +427 -390
- package/dist/css-components/editorial-content.js +42 -42
- package/dist/css-components/icon.js +72 -72
- package/dist/css-components/interactive-feedback.js +239 -217
- package/dist/css-components/interactive-tables.js +160 -155
- package/dist/css-components/legacy-navigation.d.ts +8 -0
- package/dist/css-components/legacy-navigation.js +816 -0
- package/dist/css-components/linked-logo-site-layout.d.ts +3 -3
- package/dist/css-components/linked-logo-site-layout.js +177 -180
- package/dist/css-components/list-tree.js +96 -94
- package/dist/css-components/list.js +9 -7
- package/dist/css-components/logo-media.d.ts +6 -6
- package/dist/css-components/logo-media.js +218 -207
- package/dist/css-components/navigation-layout.js +144 -144
- package/dist/css-components/panel.js +148 -144
- package/dist/css-components/search-box-and-filter.d.ts +0 -1
- package/dist/css-components/search-box-and-filter.js +263 -264
- package/dist/css-components/sites-editorial-ports.d.ts +3 -4
- package/dist/css-components/sites-editorial-ports.js +279 -247
- package/dist/css-components/sites-foundation.js +142 -146
- package/dist/css-components/sites-rich-lists.d.ts +5 -5
- package/dist/css-components/sites-rich-lists.js +339 -349
- package/dist/css-components/static-content-ports.d.ts +3 -3
- package/dist/css-components/static-content-ports.js +200 -186
- package/dist/css-components/tab-section.d.ts +3 -3
- package/dist/css-components/tab-section.js +93 -85
- package/dist/css-components/table.js +76 -75
- package/dist/css-components/tabs-choice-breadcrumbs.js +307 -303
- package/dist/css-components/tiered-list-equal-height-row.js +271 -271
- package/dist/css-components.js +1881 -2554
- package/dist/css-grid.d.ts +1 -1
- package/dist/css-grid.js +183 -173
- package/dist/css.js +317 -241
- package/dist/experiments/ibm-plex-engine-smoke/styles.css +894 -538
- package/dist/experiments/ibm-plex-engine-smoke/surfaces.json +2 -2
- package/dist/experiments/ibm-plex-engine-smoke/tokens.json +1 -1
- package/dist/in-page-navigation.js +1 -1
- package/dist/presets/app-tier/styles.css +928 -568
- package/dist/presets/app-tier/surfaces.json +17 -17
- package/dist/presets/app-tier/tokens.json +7 -7
- package/dist/presets/prose/styles.css +919 -562
- package/dist/presets/prose/surfaces.json +17 -17
- package/dist/presets/prose/tokens.json +1 -1
- package/dist/resizable-aside.js +12 -4
- package/dist/styles.css +919 -562
- package/dist/surfaces.json +17 -17
- package/dist/tiers/app/styles.css +928 -568
- package/dist/tiers/app/surfaces.json +17 -17
- package/dist/tiers/app/tokens.json +7 -7
- package/dist/tiers/documentation/styles.css +920 -563
- package/dist/tiers/documentation/surfaces.json +17 -17
- package/dist/tiers/documentation/tokens.json +2 -2
- package/dist/tiers/editorial/styles.css +919 -562
- package/dist/tiers/editorial/surfaces.json +17 -17
- package/dist/tiers/editorial/tokens.json +1 -1
- package/dist/tiers/os/styles.css +925 -568
- package/dist/tiers/os/surfaces.json +17 -17
- package/dist/tiers/os/tokens.json +7 -7
- package/dist/tokens.json +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/publishing.md +31 -14
- 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:
|
|
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:
|
|
227
|
-
outline-offset:
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
--bf-inline-size
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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:
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
:
|
|
411
|
-
block-size: var(--bf-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
${
|
|
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
|
}
|