@frontfactory/vitepress-theme 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/README.md +163 -7
- package/config.d.ts +27 -1
- package/config.js +186 -21
- package/dist/style.css +1 -1
- package/node/blog.d.ts +3 -0
- package/node/blog.js +19 -0
- package/node/llms.js +32 -0
- package/node/og.js +158 -0
- package/node/pages.js +162 -0
- package/node/rss.js +78 -0
- package/package.json +42 -28
- package/src/blog/posts.data.ts +47 -0
- package/src/components/FfBackToTop.vue +19 -10
- package/src/components/FfBanner.vue +24 -6
- package/src/components/FfCopyStatus.vue +64 -0
- package/src/components/FfDocMeta.vue +325 -3
- package/src/components/FfFeature.vue +18 -7
- package/src/components/FfFeedback.vue +96 -0
- package/src/components/FfHero.vue +26 -35
- package/src/components/FfHeroActions.vue +44 -0
- package/src/components/FfHeroCommand.vue +22 -35
- package/src/components/FfHomeSponsors.vue +2 -2
- package/src/components/FfNavBarTitle.vue +63 -0
- package/src/components/FfPost.vue +50 -0
- package/src/components/FfProgress.vue +69 -0
- package/src/components/FfVersionSwitcher.vue +20 -0
- package/src/composables/blog.ts +41 -0
- package/src/composables/copy.ts +36 -0
- package/src/composables/options.ts +20 -1
- package/src/composables/tabs.ts +122 -0
- package/src/content/Api.vue +6 -2
- package/src/content/Badge.vue +26 -0
- package/src/content/Callout.vue +27 -0
- package/src/content/FileTree.vue +118 -0
- package/src/content/Tab.vue +11 -0
- package/src/content/Tabs.vue +95 -0
- package/src/content/Timeline.vue +19 -0
- package/src/content/TimelineItem.vue +37 -0
- package/src/content/timeline.ts +4 -0
- package/src/index.ts +37 -1
- package/src/internal.ts +8 -2
- package/src/layout/FfBlog.vue +62 -0
- package/src/layout/FfLayout.vue +20 -4
- package/src/styles/_base.scss +6 -14
- package/src/styles/_blocks.scss +29 -8
- package/src/styles/_blog.scss +130 -0
- package/src/styles/_breakpoints.scss +26 -0
- package/src/styles/_code.scss +11 -17
- package/src/styles/_content.scss +377 -18
- package/src/styles/_doc.scss +32 -29
- package/src/styles/_home.scss +47 -65
- package/src/styles/_mixins.scss +63 -0
- package/src/styles/_motion.scss +24 -13
- package/src/styles/_nav.scss +90 -24
- package/src/styles/_print.scss +77 -0
- package/src/styles/_sidebar.scss +7 -10
- package/src/styles/_tokens.scss +92 -11
- package/src/styles/index.scss +2 -0
- package/src/types.ts +148 -0
- package/types/blog/posts.data.d.ts +14 -0
- package/types/components/FfBackToTop.vue.d.ts +3 -0
- package/types/components/FfBanner.vue.d.ts +3 -0
- package/types/components/FfCopyStatus.vue.d.ts +3 -0
- package/types/components/FfDocMeta.vue.d.ts +3 -0
- package/types/components/FfFeature.vue.d.ts +13 -0
- package/types/components/FfFeedback.vue.d.ts +3 -0
- package/types/components/FfFooter.vue.d.ts +3 -0
- package/types/components/FfHero.vue.d.ts +42 -0
- package/types/components/FfHeroActions.vue.d.ts +19 -0
- package/types/components/FfHeroCommand.vue.d.ts +9 -0
- package/types/components/FfHomeSponsors.vue.d.ts +19 -0
- package/types/components/FfNavBarTitle.vue.d.ts +17 -0
- package/types/components/FfPost.vue.d.ts +3 -0
- package/types/components/FfProgress.vue.d.ts +3 -0
- package/types/components/FfVersionSwitcher.vue.d.ts +3 -0
- package/types/composables/blog.d.ts +10 -0
- package/types/composables/copy.d.ts +6 -0
- package/types/composables/link.d.ts +12 -0
- package/types/composables/options.d.ts +15 -0
- package/types/composables/relativeTime.d.ts +2 -0
- package/types/composables/tabs.d.ts +10 -0
- package/types/content/Api.vue.d.ts +27 -0
- package/types/content/Badge.vue.d.ts +21 -0
- package/types/content/Callout.vue.d.ts +24 -0
- package/types/content/Card.vue.d.ts +23 -0
- package/types/content/CardGrid.vue.d.ts +20 -0
- package/types/content/FileTree.vue.d.ts +6 -0
- package/types/content/Kbd.vue.d.ts +15 -0
- package/types/content/Steps.vue.d.ts +15 -0
- package/types/content/Tab.vue.d.ts +19 -0
- package/types/content/Tabs.vue.d.ts +7 -0
- package/types/content/Timeline.vue.d.ts +21 -0
- package/types/content/TimelineItem.vue.d.ts +21 -0
- package/types/content/timeline.d.ts +3 -0
- package/types/index.d.ts +25 -0
- package/types/internal.d.ts +10 -0
- package/types/layout/FfBlog.vue.d.ts +3 -0
- package/types/layout/FfLayout.vue.d.ts +23 -0
- package/types/types.d.ts +280 -0
package/src/styles/_content.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// THEME COMPONENTS //
|
|
3
3
|
// ============================================================================================= //
|
|
4
4
|
|
|
5
|
+
@use "breakpoints" as bp;
|
|
6
|
+
@use "mixins";
|
|
5
7
|
@use "theme" as mg;
|
|
6
8
|
|
|
7
9
|
// The dismissal class is set on <html>, outside the themed root. It carries the themed root in the
|
|
@@ -40,8 +42,6 @@
|
|
|
40
42
|
gap: 1rem;
|
|
41
43
|
min-height: #{mg.ref("banner-height")};
|
|
42
44
|
padding: 0.625rem 3rem;
|
|
43
|
-
background: #{mg.ref("color-ink")};
|
|
44
|
-
color: #{mg.ref("color-paper")};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// `ff.navSticky: false` un-fixes the bar it sits above, so the banner follows it into normal
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
display: flex;
|
|
122
122
|
align-items: center;
|
|
123
123
|
gap: 0.75rem;
|
|
124
|
-
font-size:
|
|
124
|
+
font-size: #{mg.ref("size-small")};
|
|
125
125
|
color: inherit;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
// ----------------------------------------------------------------------------------------- //
|
|
162
162
|
|
|
163
163
|
.ff-doc-meta {
|
|
164
|
+
display: flex;
|
|
164
165
|
flex-wrap: wrap;
|
|
165
166
|
gap: 0.75rem;
|
|
166
167
|
margin-bottom: 1.5rem;
|
|
@@ -173,6 +174,170 @@
|
|
|
173
174
|
margin-right: 0.75rem;
|
|
174
175
|
}
|
|
175
176
|
|
|
177
|
+
// Pushed to the end of the row and framed like the hero copy button, so it reads as a control
|
|
178
|
+
// rather than one more piece of metadata.
|
|
179
|
+
|
|
180
|
+
.ff-doc-meta-actions {
|
|
181
|
+
position: relative;
|
|
182
|
+
margin-left: auto;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// One pill: the main button and the chevron share the frame, split by a thin divider.
|
|
186
|
+
|
|
187
|
+
.ff-doc-meta-split {
|
|
188
|
+
display: inline-flex;
|
|
189
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
190
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
191
|
+
transition: border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ff-doc-meta-split:hover,
|
|
195
|
+
.ff-doc-meta-split.copied {
|
|
196
|
+
border-color: #{mg.ref("color-rule-strong")};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ff-doc-meta-main,
|
|
200
|
+
.ff-doc-meta-toggle {
|
|
201
|
+
display: inline-flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
gap: 0.5em;
|
|
204
|
+
padding: 0.375rem 0.625rem;
|
|
205
|
+
border: 0;
|
|
206
|
+
background: transparent;
|
|
207
|
+
font: inherit;
|
|
208
|
+
letter-spacing: inherit;
|
|
209
|
+
text-transform: inherit;
|
|
210
|
+
color: inherit;
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
transition:
|
|
213
|
+
background-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
214
|
+
color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ff-doc-meta-main {
|
|
218
|
+
border-radius: #{mg.ref("radius-sm")} 0 0 #{mg.ref("radius-sm")};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.ff-doc-meta-toggle {
|
|
222
|
+
border-radius: 0 #{mg.ref("radius-sm")} #{mg.ref("radius-sm")} 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.ff-doc-meta-main + .ff-doc-meta-toggle {
|
|
226
|
+
padding-inline: 0.5rem;
|
|
227
|
+
border-left: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.ff-doc-meta-main:hover,
|
|
231
|
+
.ff-doc-meta-toggle:hover,
|
|
232
|
+
.ff-doc-meta-toggle.open,
|
|
233
|
+
.ff-doc-meta-split.copied .ff-doc-meta-main {
|
|
234
|
+
background-color: #{mg.ref("color-surface-alt")};
|
|
235
|
+
color: #{mg.ref("color-ink")};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.ff-doc-meta-main:focus-visible,
|
|
239
|
+
.ff-doc-meta-toggle:focus-visible,
|
|
240
|
+
.ff-doc-meta-menu > :focus-visible {
|
|
241
|
+
outline: 2px solid var(--vp-c-brand-1);
|
|
242
|
+
outline-offset: -2px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.ff-doc-meta-icon {
|
|
246
|
+
flex: none;
|
|
247
|
+
width: 1rem;
|
|
248
|
+
height: 1rem;
|
|
249
|
+
fill: none;
|
|
250
|
+
stroke: currentcolor;
|
|
251
|
+
stroke-width: 2;
|
|
252
|
+
stroke-linecap: round;
|
|
253
|
+
stroke-linejoin: round;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ff-doc-meta-icon.brand {
|
|
257
|
+
fill: currentcolor;
|
|
258
|
+
stroke: none;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ff-doc-meta-chevron {
|
|
262
|
+
transition: transform #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ff-doc-meta-toggle.open .ff-doc-meta-chevron {
|
|
266
|
+
transform: rotate(180deg);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Under the trigger and right-aligned with it, so it stays on screen: the pill sits at the end
|
|
270
|
+
// of the row.
|
|
271
|
+
|
|
272
|
+
.ff-doc-meta-menu {
|
|
273
|
+
position: absolute;
|
|
274
|
+
top: 100%;
|
|
275
|
+
right: 0;
|
|
276
|
+
z-index: #{mg.ref("z-float")};
|
|
277
|
+
display: flex;
|
|
278
|
+
flex-direction: column;
|
|
279
|
+
min-width: 14rem;
|
|
280
|
+
max-width: calc(100vw - 2rem);
|
|
281
|
+
margin-top: 0.375rem;
|
|
282
|
+
padding: 0.375rem;
|
|
283
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
284
|
+
border-radius: #{mg.ref("radius-md")};
|
|
285
|
+
background: var(--vp-c-bg-elv);
|
|
286
|
+
box-shadow: var(--vp-shadow-3);
|
|
287
|
+
white-space: nowrap;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.ff-doc-meta-menu > button,
|
|
291
|
+
.ff-doc-meta-menu > a {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
gap: 0.625rem;
|
|
295
|
+
padding: 0.5rem 0.625rem;
|
|
296
|
+
border: 0;
|
|
297
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
298
|
+
background: transparent;
|
|
299
|
+
font: inherit;
|
|
300
|
+
letter-spacing: inherit;
|
|
301
|
+
text-transform: inherit;
|
|
302
|
+
text-align: left;
|
|
303
|
+
text-decoration: none;
|
|
304
|
+
color: inherit;
|
|
305
|
+
cursor: pointer;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ff-doc-meta-menu > button:hover,
|
|
309
|
+
.ff-doc-meta-menu > a:hover,
|
|
310
|
+
.ff-doc-meta-menu > :focus-visible {
|
|
311
|
+
background-color: #{mg.ref("color-surface-alt")};
|
|
312
|
+
color: #{mg.ref("color-ink")};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ff-doc-meta-menu-text {
|
|
316
|
+
display: flex;
|
|
317
|
+
flex: 1;
|
|
318
|
+
flex-direction: column;
|
|
319
|
+
gap: 0.125rem;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.ff-doc-meta-menu small {
|
|
323
|
+
font-size: 0.85em;
|
|
324
|
+
color: #{mg.ref("color-ink-muted")};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.ff-doc-meta-external {
|
|
328
|
+
width: 0.875rem;
|
|
329
|
+
height: 0.875rem;
|
|
330
|
+
color: #{mg.ref("color-ink-muted")};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.ff-doc-meta-menu hr {
|
|
334
|
+
width: 100%;
|
|
335
|
+
height: 0;
|
|
336
|
+
margin: 0.375rem 0;
|
|
337
|
+
border: 0;
|
|
338
|
+
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
339
|
+
}
|
|
340
|
+
|
|
176
341
|
// ----------------------------------------------------------------------------------------- //
|
|
177
342
|
// Back to top
|
|
178
343
|
// ----------------------------------------------------------------------------------------- //
|
|
@@ -181,7 +346,7 @@
|
|
|
181
346
|
position: fixed;
|
|
182
347
|
right: 1.5rem;
|
|
183
348
|
bottom: 1.5rem;
|
|
184
|
-
z-index:
|
|
349
|
+
z-index: #{mg.ref("z-float")};
|
|
185
350
|
gap: 0.375rem;
|
|
186
351
|
padding: 0.625rem 0.75rem;
|
|
187
352
|
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
@@ -191,10 +356,6 @@
|
|
|
191
356
|
opacity: 0;
|
|
192
357
|
transform: translateY(0.5rem);
|
|
193
358
|
pointer-events: none;
|
|
194
|
-
transition:
|
|
195
|
-
opacity #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
196
|
-
transform #{mg.ref("motion-duration")} #{mg.ref("motion-ease")},
|
|
197
|
-
border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
198
359
|
}
|
|
199
360
|
|
|
200
361
|
.ff-to-top.is-visible {
|
|
@@ -203,6 +364,62 @@
|
|
|
203
364
|
pointer-events: auto;
|
|
204
365
|
}
|
|
205
366
|
|
|
367
|
+
// ----------------------------------------------------------------------------------------- //
|
|
368
|
+
// Reading progress
|
|
369
|
+
// ----------------------------------------------------------------------------------------- //
|
|
370
|
+
|
|
371
|
+
// One step above the layout-top band, so it also covers the banner and the navigation.
|
|
372
|
+
|
|
373
|
+
.ff-progress {
|
|
374
|
+
position: fixed;
|
|
375
|
+
top: 0;
|
|
376
|
+
right: 0;
|
|
377
|
+
left: 0;
|
|
378
|
+
z-index: calc(var(--vp-z-index-layout-top) + 1);
|
|
379
|
+
height: #{mg.ref("rule-accent-width")};
|
|
380
|
+
background: #{mg.ref("color-accent")};
|
|
381
|
+
transform-origin: left;
|
|
382
|
+
pointer-events: none;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// ----------------------------------------------------------------------------------------- //
|
|
386
|
+
// Page feedback
|
|
387
|
+
// ----------------------------------------------------------------------------------------- //
|
|
388
|
+
|
|
389
|
+
.ff-feedback {
|
|
390
|
+
display: flex;
|
|
391
|
+
flex-wrap: wrap;
|
|
392
|
+
align-items: center;
|
|
393
|
+
gap: 0.75rem 1rem;
|
|
394
|
+
margin-bottom: 1.5rem;
|
|
395
|
+
padding-top: 1.5rem;
|
|
396
|
+
border-top: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.ff-feedback-question,
|
|
400
|
+
.ff-feedback-thanks {
|
|
401
|
+
margin: 0;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.ff-feedback-actions {
|
|
405
|
+
display: flex;
|
|
406
|
+
gap: 0.5rem;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.ff-feedback-button {
|
|
410
|
+
padding: 0.5rem 0.75rem;
|
|
411
|
+
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
412
|
+
border-radius: #{mg.ref("radius-sm")};
|
|
413
|
+
background: transparent;
|
|
414
|
+
color: #{mg.ref("color-ink-muted")};
|
|
415
|
+
cursor: pointer;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.ff-feedback-button:hover {
|
|
419
|
+
border-color: #{mg.ref("color-rule-strong")};
|
|
420
|
+
background: #{mg.ref("color-surface-alt")};
|
|
421
|
+
}
|
|
422
|
+
|
|
206
423
|
// ----------------------------------------------------------------------------------------- //
|
|
207
424
|
// Footer
|
|
208
425
|
// ----------------------------------------------------------------------------------------- //
|
|
@@ -262,9 +479,8 @@
|
|
|
262
479
|
}
|
|
263
480
|
|
|
264
481
|
.ff-footer-column a {
|
|
265
|
-
font-size:
|
|
482
|
+
font-size: #{mg.ref("size-ui")};
|
|
266
483
|
color: #{mg.ref("color-ink-muted")};
|
|
267
|
-
transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
268
484
|
}
|
|
269
485
|
|
|
270
486
|
.ff-footer-column a:hover {
|
|
@@ -288,7 +504,7 @@
|
|
|
288
504
|
margin: 0;
|
|
289
505
|
}
|
|
290
506
|
|
|
291
|
-
@
|
|
507
|
+
@include bp.up("sm") {
|
|
292
508
|
.ff-footer {
|
|
293
509
|
padding: 4rem 3rem 2.5rem;
|
|
294
510
|
}
|
|
@@ -317,7 +533,6 @@
|
|
|
317
533
|
border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
318
534
|
border-radius: #{mg.ref("radius-md")};
|
|
319
535
|
background: #{mg.ref("color-surface")};
|
|
320
|
-
transition: border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
321
536
|
}
|
|
322
537
|
|
|
323
538
|
.vp-doc a.ff-card {
|
|
@@ -339,21 +554,21 @@
|
|
|
339
554
|
.vp-doc .ff-card-title {
|
|
340
555
|
margin: 0;
|
|
341
556
|
font-family: #{mg.ref("font-display")};
|
|
342
|
-
font-size:
|
|
557
|
+
font-size: #{mg.ref("size-body")};
|
|
343
558
|
font-weight: 620;
|
|
344
|
-
letter-spacing: -
|
|
559
|
+
letter-spacing: #{mg.ref("tracking-tight")};
|
|
345
560
|
color: #{mg.ref("color-ink")};
|
|
346
561
|
}
|
|
347
562
|
|
|
348
563
|
.vp-doc .ff-card-body,
|
|
349
564
|
.vp-doc .ff-card-body p {
|
|
350
565
|
margin: 0.5rem 0 0;
|
|
351
|
-
font-size:
|
|
566
|
+
font-size: #{mg.ref("size-ui-lg")};
|
|
352
567
|
line-height: 1.6;
|
|
353
568
|
color: #{mg.ref("color-ink-muted")};
|
|
354
569
|
}
|
|
355
570
|
|
|
356
|
-
@
|
|
571
|
+
@include bp.down("sm") {
|
|
357
572
|
.vp-doc .ff-card-grid {
|
|
358
573
|
grid-template-columns: minmax(0, 1fr);
|
|
359
574
|
}
|
|
@@ -446,7 +661,7 @@
|
|
|
446
661
|
}
|
|
447
662
|
|
|
448
663
|
.vp-doc .ff-api-signature code {
|
|
449
|
-
font-size:
|
|
664
|
+
font-size: #{mg.ref("size-small")};
|
|
450
665
|
color: #{mg.ref("color-ink-muted")};
|
|
451
666
|
}
|
|
452
667
|
|
|
@@ -466,9 +681,153 @@
|
|
|
466
681
|
border-radius: #{mg.ref("radius-sm")};
|
|
467
682
|
background: #{mg.ref("color-surface")};
|
|
468
683
|
font-family: #{mg.ref("font-mono")};
|
|
469
|
-
font-size:
|
|
684
|
+
font-size: #{mg.ref("size-meta")};
|
|
470
685
|
line-height: 1.4;
|
|
471
686
|
text-align: center;
|
|
472
687
|
color: #{mg.ref("color-ink-muted")};
|
|
473
688
|
}
|
|
689
|
+
|
|
690
|
+
// ----------------------------------------------------------------------------------------- //
|
|
691
|
+
// Tabs
|
|
692
|
+
// ----------------------------------------------------------------------------------------- //
|
|
693
|
+
|
|
694
|
+
.vp-doc .ff-tabs {
|
|
695
|
+
margin: 1.5rem 0;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.vp-doc .ff-tabs-list {
|
|
699
|
+
display: flex;
|
|
700
|
+
flex-wrap: wrap;
|
|
701
|
+
margin-bottom: 1rem;
|
|
702
|
+
border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.vp-doc .ff-tabs-tab {
|
|
706
|
+
@include mixins.tab;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// The first and last blocks of a panel carry their own margins, which would double up with
|
|
710
|
+
// the gap under the tab list.
|
|
711
|
+
|
|
712
|
+
.vp-doc .ff-tabs-panel > :first-child {
|
|
713
|
+
margin-top: 0;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.vp-doc .ff-tabs-panel > :last-child {
|
|
717
|
+
margin-bottom: 0;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// ----------------------------------------------------------------------------------------- //
|
|
721
|
+
// File tree
|
|
722
|
+
// ----------------------------------------------------------------------------------------- //
|
|
723
|
+
|
|
724
|
+
.vp-doc .ff-filetree {
|
|
725
|
+
margin: 1.75rem 0;
|
|
726
|
+
font-family: #{mg.ref("font-mono")};
|
|
727
|
+
font-size: #{mg.ref("size-ui")};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.vp-doc .ff-filetree ul {
|
|
731
|
+
margin: 0;
|
|
732
|
+
padding: 0;
|
|
733
|
+
list-style: none;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
// Each level hangs from a hairline guide, like the rail of the steps.
|
|
737
|
+
|
|
738
|
+
.vp-doc .ff-filetree ul ul {
|
|
739
|
+
margin-left: 0.5rem;
|
|
740
|
+
padding-left: 1rem;
|
|
741
|
+
border-left: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.vp-doc .ff-filetree li {
|
|
745
|
+
margin: 0;
|
|
746
|
+
padding: 0.125rem 0;
|
|
747
|
+
line-height: 1.6;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.vp-doc .ff-filetree .is-file > .ff-filetree-name {
|
|
751
|
+
color: #{mg.ref("color-ink-muted")};
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.vp-doc .ff-filetree .is-folder > .ff-filetree-name {
|
|
755
|
+
font-weight: 500;
|
|
756
|
+
color: #{mg.ref("color-ink")};
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.vp-doc .ff-filetree .is-folder > .ff-filetree-name::after {
|
|
760
|
+
content: "/";
|
|
761
|
+
color: #{mg.ref("color-ink-faint")};
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.vp-doc .ff-filetree code {
|
|
765
|
+
padding: 0;
|
|
766
|
+
background: transparent;
|
|
767
|
+
font-size: inherit;
|
|
768
|
+
color: inherit;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// ----------------------------------------------------------------------------------------- //
|
|
772
|
+
// Timeline
|
|
773
|
+
// ----------------------------------------------------------------------------------------- //
|
|
774
|
+
|
|
775
|
+
// The same ruled rail as the steps, with a square marker on the line instead of a number.
|
|
776
|
+
|
|
777
|
+
.vp-doc .ff-timeline {
|
|
778
|
+
margin: 1.75rem 0;
|
|
779
|
+
padding-left: 2.5rem;
|
|
780
|
+
border-left: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.vp-doc .ff-timeline-item {
|
|
784
|
+
position: relative;
|
|
785
|
+
padding-bottom: 1.75rem;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.vp-doc .ff-timeline-item:last-child {
|
|
789
|
+
padding-bottom: 0;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.vp-doc .ff-timeline-item::before {
|
|
793
|
+
position: absolute;
|
|
794
|
+
top: 0.3125rem;
|
|
795
|
+
left: -2.8125rem;
|
|
796
|
+
width: 0.625rem;
|
|
797
|
+
height: 0.625rem;
|
|
798
|
+
border: #{mg.ref("rule-accent-width")} solid #{mg.ref("color-accent")};
|
|
799
|
+
background: #{mg.ref("color-paper")};
|
|
800
|
+
content: "";
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.vp-doc .ff-timeline-date {
|
|
804
|
+
margin: 0;
|
|
805
|
+
font-family: #{mg.ref("font-mono")};
|
|
806
|
+
font-size: #{mg.ref("size-label")};
|
|
807
|
+
text-transform: uppercase;
|
|
808
|
+
letter-spacing: #{mg.ref("tracking-label")};
|
|
809
|
+
color: #{mg.ref("color-ink-faint")};
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.vp-doc .ff-timeline-title {
|
|
813
|
+
margin: 0.25rem 0 0;
|
|
814
|
+
padding: 0;
|
|
815
|
+
border: 0;
|
|
816
|
+
font-family: #{mg.ref("font-display")};
|
|
817
|
+
font-size: 1.0625rem;
|
|
818
|
+
|
|
819
|
+
// Pinned rather than inherited: the title can be any heading level (see Timeline `level`).
|
|
820
|
+
font-weight: 600;
|
|
821
|
+
font-variation-settings: "opsz" 32;
|
|
822
|
+
line-height: 1.75rem;
|
|
823
|
+
letter-spacing: normal;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.vp-doc .ff-timeline-body > :first-child {
|
|
827
|
+
margin-top: 0.5rem;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.vp-doc .ff-timeline-body > :last-child {
|
|
831
|
+
margin-bottom: 0;
|
|
832
|
+
}
|
|
474
833
|
}
|
package/src/styles/_doc.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// DOCUMENT //
|
|
3
3
|
// ============================================================================================= //
|
|
4
4
|
|
|
5
|
+
@use "breakpoints" as bp;
|
|
6
|
+
@use "mixins";
|
|
5
7
|
@use "theme" as mg;
|
|
6
8
|
|
|
7
9
|
// The frame: the band every page lives in.
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
.ff-theme {
|
|
16
|
-
@
|
|
18
|
+
@include bp.up("md") {
|
|
17
19
|
.VPSidebar {
|
|
18
20
|
padding-left: var(--ff-frame);
|
|
19
21
|
width: calc(var(--ff-frame) + var(--vp-sidebar-width));
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
// The outline lives in a container of a fixed width, so the column that holds it must never be
|
|
40
42
|
// squeezed by the text: it would spill out of the band, past the bar above it.
|
|
41
43
|
|
|
42
|
-
@
|
|
44
|
+
@include bp.up("lg") {
|
|
43
45
|
.VPDoc .aside {
|
|
44
46
|
flex: 0 0 auto;
|
|
45
47
|
width: 16rem;
|
|
@@ -67,6 +69,19 @@
|
|
|
67
69
|
max-width: none;
|
|
68
70
|
}
|
|
69
71
|
|
|
72
|
+
// `wide: true` in the frontmatter: wide tables and API listings take the full band and give the
|
|
73
|
+
// outline column back.
|
|
74
|
+
|
|
75
|
+
&[data-layout="wide"] {
|
|
76
|
+
.VPDoc .content-container {
|
|
77
|
+
max-width: #{mg.ref("layout-wide")};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.VPDoc .aside {
|
|
81
|
+
display: none;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
70
85
|
// ----------------------------------------------------------------------------------------- //
|
|
71
86
|
// Headings
|
|
72
87
|
// ----------------------------------------------------------------------------------------- //
|
|
@@ -82,10 +97,8 @@
|
|
|
82
97
|
|
|
83
98
|
.vp-doc h1 {
|
|
84
99
|
margin: 0 0 1.25rem;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
line-height: #{mg.ref("leading-tight")};
|
|
88
|
-
letter-spacing: -0.03em;
|
|
100
|
+
|
|
101
|
+
@include mixins.page-title;
|
|
89
102
|
}
|
|
90
103
|
|
|
91
104
|
.vp-doc h2 {
|
|
@@ -115,12 +128,12 @@
|
|
|
115
128
|
margin: 2.5rem 0 0.75rem;
|
|
116
129
|
font-size: #{mg.ref("size-h3")};
|
|
117
130
|
font-weight: 600;
|
|
118
|
-
letter-spacing: -
|
|
131
|
+
letter-spacing: #{mg.ref("tracking-subheading")};
|
|
119
132
|
}
|
|
120
133
|
|
|
121
134
|
.vp-doc h4 {
|
|
122
135
|
margin: 2rem 0 0.5rem;
|
|
123
|
-
font-size:
|
|
136
|
+
font-size: #{mg.ref("size-body")};
|
|
124
137
|
font-weight: 600;
|
|
125
138
|
}
|
|
126
139
|
|
|
@@ -144,7 +157,7 @@
|
|
|
144
157
|
.vp-doc h2:hover .header-anchor,
|
|
145
158
|
.vp-doc h3:hover .header-anchor,
|
|
146
159
|
.vp-doc h4:hover .header-anchor,
|
|
147
|
-
.vp-doc .header-anchor:focus {
|
|
160
|
+
.vp-doc .header-anchor:focus-visible {
|
|
148
161
|
opacity: 1;
|
|
149
162
|
}
|
|
150
163
|
|
|
@@ -176,7 +189,7 @@
|
|
|
176
189
|
color: #{mg.ref("color-accent")};
|
|
177
190
|
text-decoration-thickness: 1px;
|
|
178
191
|
text-underline-offset: 0.2em;
|
|
179
|
-
text-decoration-color: #{mg.ref("color-accent
|
|
192
|
+
text-decoration-color: color-mix(in srgb, #{mg.ref("color-accent")} 55%, transparent);
|
|
180
193
|
transition: text-decoration-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
181
194
|
}
|
|
182
195
|
|
|
@@ -196,7 +209,7 @@
|
|
|
196
209
|
}
|
|
197
210
|
|
|
198
211
|
.vp-doc blockquote > p {
|
|
199
|
-
font-size:
|
|
212
|
+
font-size: #{mg.ref("size-body")};
|
|
200
213
|
font-style: italic;
|
|
201
214
|
color: #{mg.ref("color-ink-muted")};
|
|
202
215
|
}
|
|
@@ -254,20 +267,16 @@
|
|
|
254
267
|
border: 0;
|
|
255
268
|
border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule-strong")};
|
|
256
269
|
background: transparent;
|
|
257
|
-
font-family: #{mg.ref("font-mono")};
|
|
258
|
-
font-size: #{mg.ref("size-label")};
|
|
259
|
-
font-weight: 500;
|
|
260
270
|
text-align: left;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
color: #{mg.ref("color-ink-faint")};
|
|
271
|
+
|
|
272
|
+
@include mixins.label;
|
|
264
273
|
}
|
|
265
274
|
|
|
266
275
|
.vp-doc td {
|
|
267
276
|
padding: 0.75rem 0.875rem 0.75rem 0;
|
|
268
277
|
border: 0;
|
|
269
278
|
border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
|
|
270
|
-
font-size:
|
|
279
|
+
font-size: #{mg.ref("size-ui-lg")};
|
|
271
280
|
line-height: 1.6;
|
|
272
281
|
vertical-align: top;
|
|
273
282
|
}
|
|
@@ -330,19 +339,14 @@
|
|
|
330
339
|
}
|
|
331
340
|
|
|
332
341
|
.VPDocFooter .pager-link .desc {
|
|
333
|
-
|
|
334
|
-
font-size: #{mg.ref("size-label")};
|
|
335
|
-
font-weight: 500;
|
|
336
|
-
text-transform: uppercase;
|
|
337
|
-
letter-spacing: #{mg.ref("tracking-label")};
|
|
338
|
-
color: #{mg.ref("color-ink-faint")};
|
|
342
|
+
@include mixins.label;
|
|
339
343
|
}
|
|
340
344
|
|
|
341
345
|
.VPDocFooter .pager-link .title {
|
|
342
346
|
font-family: #{mg.ref("font-display")};
|
|
343
347
|
font-size: 1.0625rem;
|
|
344
348
|
font-weight: 600;
|
|
345
|
-
letter-spacing: -
|
|
349
|
+
letter-spacing: #{mg.ref("tracking-subheading")};
|
|
346
350
|
color: #{mg.ref("color-ink")};
|
|
347
351
|
}
|
|
348
352
|
|
|
@@ -375,7 +379,7 @@
|
|
|
375
379
|
font-weight: 600;
|
|
376
380
|
line-height: 1.4;
|
|
377
381
|
text-transform: uppercase;
|
|
378
|
-
letter-spacing:
|
|
382
|
+
letter-spacing: #{mg.ref("tracking-label-wide")};
|
|
379
383
|
color: #{mg.ref("color-ink")};
|
|
380
384
|
}
|
|
381
385
|
|
|
@@ -388,14 +392,13 @@
|
|
|
388
392
|
.VPDocAsideOutline .outline-link {
|
|
389
393
|
display: block;
|
|
390
394
|
padding: 0.25rem 0;
|
|
391
|
-
font-size:
|
|
395
|
+
font-size: #{mg.ref("size-ui")};
|
|
392
396
|
font-weight: 450;
|
|
393
397
|
line-height: 1.5;
|
|
394
398
|
color: #{mg.ref("color-ink-muted")};
|
|
395
399
|
white-space: normal;
|
|
396
400
|
overflow: visible;
|
|
397
401
|
overflow-wrap: break-word;
|
|
398
|
-
transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
|
|
399
402
|
}
|
|
400
403
|
|
|
401
404
|
.VPDocAsideOutline .outline-link:hover {
|
|
@@ -412,6 +415,6 @@
|
|
|
412
415
|
}
|
|
413
416
|
|
|
414
417
|
.VPDocAsideOutline .VPDocOutlineItem.nested .outline-link {
|
|
415
|
-
font-size:
|
|
418
|
+
font-size: #{mg.ref("size-small")};
|
|
416
419
|
}
|
|
417
420
|
}
|