@frontfactory/vitepress-theme 1.8.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +20 -7
  3. package/config.d.ts +4 -3
  4. package/config.js +58 -37
  5. package/dist/style.css +1 -1
  6. package/node/blog.d.ts +3 -0
  7. package/node/blog.js +19 -0
  8. package/node/llms.js +4 -3
  9. package/node/og.js +5 -6
  10. package/node/pages.js +14 -6
  11. package/node/rss.js +6 -9
  12. package/package.json +1 -1
  13. package/src/blog/posts.data.ts +3 -2
  14. package/src/components/FfBackToTop.vue +1 -1
  15. package/src/components/FfCopyStatus.vue +1 -1
  16. package/src/components/FfDocMeta.vue +300 -17
  17. package/src/components/FfHero.vue +14 -33
  18. package/src/components/FfHeroActions.vue +44 -0
  19. package/src/components/FfHeroCommand.vue +3 -2
  20. package/src/components/FfPost.vue +4 -3
  21. package/src/composables/blog.ts +7 -4
  22. package/src/composables/copy.ts +36 -0
  23. package/src/composables/options.ts +9 -1
  24. package/src/composables/tabs.ts +2 -35
  25. package/src/content/Tabs.vue +27 -6
  26. package/src/internal.ts +1 -0
  27. package/src/layout/FfLayout.vue +3 -3
  28. package/src/styles/_base.scss +5 -9
  29. package/src/styles/_blocks.scss +4 -7
  30. package/src/styles/_blog.scss +4 -5
  31. package/src/styles/_code.scss +6 -12
  32. package/src/styles/_content.scss +153 -63
  33. package/src/styles/_doc.scss +14 -24
  34. package/src/styles/_home.scss +11 -49
  35. package/src/styles/_mixins.scss +63 -0
  36. package/src/styles/_motion.scss +12 -10
  37. package/src/styles/_nav.scss +12 -19
  38. package/src/styles/_sidebar.scss +5 -8
  39. package/src/styles/_tokens.scss +19 -4
  40. package/src/types.ts +30 -4
  41. package/types/components/FfHeroActions.vue.d.ts +19 -0
  42. package/types/composables/copy.d.ts +6 -0
  43. package/types/composables/tabs.d.ts +0 -5
  44. package/types/internal.d.ts +1 -0
  45. package/types/types.d.ts +28 -4
@@ -3,6 +3,7 @@
3
3
  // ============================================================================================= //
4
4
 
5
5
  @use "breakpoints" as bp;
6
+ @use "mixins";
6
7
  @use "theme" as mg;
7
8
 
8
9
  // The dismissal class is set on <html>, outside the themed root. It carries the themed root in the
@@ -41,8 +42,6 @@
41
42
  gap: 1rem;
42
43
  min-height: #{mg.ref("banner-height")};
43
44
  padding: 0.625rem 3rem;
44
- background: #{mg.ref("color-ink")};
45
- color: #{mg.ref("color-paper")};
46
45
  }
47
46
 
48
47
  // `ff.navSticky: false` un-fixes the bar it sits above, so the banner follows it into normal
@@ -122,7 +121,7 @@
122
121
  display: flex;
123
122
  align-items: center;
124
123
  gap: 0.75rem;
125
- font-size: 0.8125rem;
124
+ font-size: #{mg.ref("size-small")};
126
125
  color: inherit;
127
126
  }
128
127
 
@@ -178,38 +177,165 @@
178
177
  // Pushed to the end of the row and framed like the hero copy button, so it reads as a control
179
178
  // rather than one more piece of metadata.
180
179
 
181
- .ff-doc-meta-copy {
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 {
182
201
  display: inline-flex;
183
202
  align-items: center;
184
203
  gap: 0.5em;
185
- margin-left: auto;
186
204
  padding: 0.375rem 0.625rem;
187
- border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
188
- border-radius: #{mg.ref("radius-sm")};
205
+ border: 0;
189
206
  background: transparent;
190
207
  font: inherit;
191
208
  letter-spacing: inherit;
192
209
  text-transform: inherit;
193
210
  color: inherit;
194
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")};
195
215
  }
196
216
 
197
- .ff-doc-meta-copy::before {
198
- content: "";
199
- width: 0.875rem;
200
- height: 0.875rem;
201
- background: var(--vp-icon-copy) 50% / contain no-repeat;
217
+ .ff-doc-meta-main {
218
+ border-radius: #{mg.ref("radius-sm")} 0 0 #{mg.ref("radius-sm")};
202
219
  }
203
220
 
204
- .ff-doc-meta-copy:hover,
205
- .ff-doc-meta-copy.copied {
206
- border-color: #{mg.ref("color-rule-strong")};
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 {
207
234
  background-color: #{mg.ref("color-surface-alt")};
208
235
  color: #{mg.ref("color-ink")};
209
236
  }
210
237
 
211
- .ff-doc-meta-copy.copied::before {
212
- background-image: var(--vp-icon-copied);
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")};
213
339
  }
214
340
 
215
341
  // ----------------------------------------------------------------------------------------- //
@@ -220,7 +346,7 @@
220
346
  position: fixed;
221
347
  right: 1.5rem;
222
348
  bottom: 1.5rem;
223
- z-index: 20;
349
+ z-index: #{mg.ref("z-float")};
224
350
  gap: 0.375rem;
225
351
  padding: 0.625rem 0.75rem;
226
352
  border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
@@ -250,7 +376,7 @@
250
376
  right: 0;
251
377
  left: 0;
252
378
  z-index: calc(var(--vp-z-index-layout-top) + 1);
253
- height: 2px;
379
+ height: #{mg.ref("rule-accent-width")};
254
380
  background: #{mg.ref("color-accent")};
255
381
  transform-origin: left;
256
382
  pointer-events: none;
@@ -353,9 +479,8 @@
353
479
  }
354
480
 
355
481
  .ff-footer-column a {
356
- font-size: 0.875rem;
482
+ font-size: #{mg.ref("size-ui")};
357
483
  color: #{mg.ref("color-ink-muted")};
358
- transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
359
484
  }
360
485
 
361
486
  .ff-footer-column a:hover {
@@ -429,16 +554,16 @@
429
554
  .vp-doc .ff-card-title {
430
555
  margin: 0;
431
556
  font-family: #{mg.ref("font-display")};
432
- font-size: 1rem;
557
+ font-size: #{mg.ref("size-body")};
433
558
  font-weight: 620;
434
- letter-spacing: -0.01em;
559
+ letter-spacing: #{mg.ref("tracking-tight")};
435
560
  color: #{mg.ref("color-ink")};
436
561
  }
437
562
 
438
563
  .vp-doc .ff-card-body,
439
564
  .vp-doc .ff-card-body p {
440
565
  margin: 0.5rem 0 0;
441
- font-size: 0.9375rem;
566
+ font-size: #{mg.ref("size-ui-lg")};
442
567
  line-height: 1.6;
443
568
  color: #{mg.ref("color-ink-muted")};
444
569
  }
@@ -536,7 +661,7 @@
536
661
  }
537
662
 
538
663
  .vp-doc .ff-api-signature code {
539
- font-size: 0.8125rem;
664
+ font-size: #{mg.ref("size-small")};
540
665
  color: #{mg.ref("color-ink-muted")};
541
666
  }
542
667
 
@@ -556,7 +681,7 @@
556
681
  border-radius: #{mg.ref("radius-sm")};
557
682
  background: #{mg.ref("color-surface")};
558
683
  font-family: #{mg.ref("font-mono")};
559
- font-size: 0.75rem;
684
+ font-size: #{mg.ref("size-meta")};
560
685
  line-height: 1.4;
561
686
  text-align: center;
562
687
  color: #{mg.ref("color-ink-muted")};
@@ -578,42 +703,7 @@
578
703
  }
579
704
 
580
705
  .vp-doc .ff-tabs-tab {
581
- position: relative;
582
- padding: 0 0.75rem 0.625rem;
583
- border: 0;
584
- background: transparent;
585
- font-family: #{mg.ref("font-mono")};
586
- font-size: #{mg.ref("size-label")};
587
- font-weight: 500;
588
- text-transform: uppercase;
589
- letter-spacing: #{mg.ref("tracking-label")};
590
- color: #{mg.ref("color-ink-faint")};
591
- cursor: pointer;
592
- transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
593
- }
594
-
595
- .vp-doc .ff-tabs-tab:first-child {
596
- padding-left: 0;
597
- }
598
-
599
- .vp-doc .ff-tabs-tab::after {
600
- position: absolute;
601
- right: 0;
602
- bottom: calc(#{mg.ref("rule-accent-width")} * -1);
603
- left: 0;
604
- height: #{mg.ref("rule-accent-width")};
605
- background: transparent;
606
- content: "";
607
- transition: background-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
608
- }
609
-
610
- .vp-doc .ff-tabs-tab:hover,
611
- .vp-doc .ff-tabs-tab.active {
612
- color: #{mg.ref("color-ink")};
613
- }
614
-
615
- .vp-doc .ff-tabs-tab.active::after {
616
- background: #{mg.ref("color-accent")};
706
+ @include mixins.tab;
617
707
  }
618
708
 
619
709
  // The first and last blocks of a panel carry their own margins, which would double up with
@@ -634,7 +724,7 @@
634
724
  .vp-doc .ff-filetree {
635
725
  margin: 1.75rem 0;
636
726
  font-family: #{mg.ref("font-mono")};
637
- font-size: 0.875rem;
727
+ font-size: #{mg.ref("size-ui")};
638
728
  }
639
729
 
640
730
  .vp-doc .ff-filetree ul {
@@ -3,6 +3,7 @@
3
3
  // ============================================================================================= //
4
4
 
5
5
  @use "breakpoints" as bp;
6
+ @use "mixins";
6
7
  @use "theme" as mg;
7
8
 
8
9
  // The frame: the band every page lives in.
@@ -96,10 +97,8 @@
96
97
 
97
98
  .vp-doc h1 {
98
99
  margin: 0 0 1.25rem;
99
- font-size: #{mg.ref("size-h1")};
100
- font-weight: 620;
101
- line-height: #{mg.ref("leading-tight")};
102
- letter-spacing: -0.03em;
100
+
101
+ @include mixins.page-title;
103
102
  }
104
103
 
105
104
  .vp-doc h2 {
@@ -129,12 +128,12 @@
129
128
  margin: 2.5rem 0 0.75rem;
130
129
  font-size: #{mg.ref("size-h3")};
131
130
  font-weight: 600;
132
- letter-spacing: -0.015em;
131
+ letter-spacing: #{mg.ref("tracking-subheading")};
133
132
  }
134
133
 
135
134
  .vp-doc h4 {
136
135
  margin: 2rem 0 0.5rem;
137
- font-size: 1rem;
136
+ font-size: #{mg.ref("size-body")};
138
137
  font-weight: 600;
139
138
  }
140
139
 
@@ -158,7 +157,7 @@
158
157
  .vp-doc h2:hover .header-anchor,
159
158
  .vp-doc h3:hover .header-anchor,
160
159
  .vp-doc h4:hover .header-anchor,
161
- .vp-doc .header-anchor:focus {
160
+ .vp-doc .header-anchor:focus-visible {
162
161
  opacity: 1;
163
162
  }
164
163
 
@@ -210,7 +209,7 @@
210
209
  }
211
210
 
212
211
  .vp-doc blockquote > p {
213
- font-size: 1rem;
212
+ font-size: #{mg.ref("size-body")};
214
213
  font-style: italic;
215
214
  color: #{mg.ref("color-ink-muted")};
216
215
  }
@@ -268,20 +267,16 @@
268
267
  border: 0;
269
268
  border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule-strong")};
270
269
  background: transparent;
271
- font-family: #{mg.ref("font-mono")};
272
- font-size: #{mg.ref("size-label")};
273
- font-weight: 500;
274
270
  text-align: left;
275
- text-transform: uppercase;
276
- letter-spacing: #{mg.ref("tracking-label")};
277
- color: #{mg.ref("color-ink-faint")};
271
+
272
+ @include mixins.label;
278
273
  }
279
274
 
280
275
  .vp-doc td {
281
276
  padding: 0.75rem 0.875rem 0.75rem 0;
282
277
  border: 0;
283
278
  border-bottom: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
284
- font-size: 0.9375rem;
279
+ font-size: #{mg.ref("size-ui-lg")};
285
280
  line-height: 1.6;
286
281
  vertical-align: top;
287
282
  }
@@ -344,19 +339,14 @@
344
339
  }
345
340
 
346
341
  .VPDocFooter .pager-link .desc {
347
- font-family: #{mg.ref("font-mono")};
348
- font-size: #{mg.ref("size-label")};
349
- font-weight: 500;
350
- text-transform: uppercase;
351
- letter-spacing: #{mg.ref("tracking-label")};
352
- color: #{mg.ref("color-ink-faint")};
342
+ @include mixins.label;
353
343
  }
354
344
 
355
345
  .VPDocFooter .pager-link .title {
356
346
  font-family: #{mg.ref("font-display")};
357
347
  font-size: 1.0625rem;
358
348
  font-weight: 600;
359
- letter-spacing: -0.015em;
349
+ letter-spacing: #{mg.ref("tracking-subheading")};
360
350
  color: #{mg.ref("color-ink")};
361
351
  }
362
352
 
@@ -402,7 +392,7 @@
402
392
  .VPDocAsideOutline .outline-link {
403
393
  display: block;
404
394
  padding: 0.25rem 0;
405
- font-size: 0.875rem;
395
+ font-size: #{mg.ref("size-ui")};
406
396
  font-weight: 450;
407
397
  line-height: 1.5;
408
398
  color: #{mg.ref("color-ink-muted")};
@@ -425,6 +415,6 @@
425
415
  }
426
416
 
427
417
  .VPDocAsideOutline .VPDocOutlineItem.nested .outline-link {
428
- font-size: 0.8125rem;
418
+ font-size: #{mg.ref("size-small")};
429
419
  }
430
420
  }
@@ -3,6 +3,7 @@
3
3
  // ============================================================================================= //
4
4
 
5
5
  @use "breakpoints" as bp;
6
+ @use "mixins";
6
7
  @use "theme" as mg;
7
8
 
8
9
  .ff-theme {
@@ -183,45 +184,7 @@
183
184
  }
184
185
 
185
186
  .ff-hero-command-tab {
186
- position: relative;
187
- padding: 0 0.75rem 0.625rem;
188
- border: 0;
189
- background: transparent;
190
- font-family: #{mg.ref("font-mono")};
191
- font-size: #{mg.ref("size-label")};
192
- font-weight: 500;
193
- text-transform: uppercase;
194
- letter-spacing: #{mg.ref("tracking-label")};
195
- color: #{mg.ref("color-ink-faint")};
196
- cursor: pointer;
197
- transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
198
- }
199
-
200
- .ff-hero-command-tab:first-child {
201
- padding-left: 0;
202
- }
203
-
204
- .ff-hero-command-tab::after {
205
- position: absolute;
206
- right: 0;
207
- bottom: calc(#{mg.ref("rule-accent-width")} * -1);
208
- left: 0;
209
- height: #{mg.ref("rule-accent-width")};
210
- background: transparent;
211
- content: "";
212
- transition: background-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
213
- }
214
-
215
- .ff-hero-command-tab:hover {
216
- color: #{mg.ref("color-ink")};
217
- }
218
-
219
- .ff-hero-command-tab.active {
220
- color: #{mg.ref("color-ink")};
221
- }
222
-
223
- .ff-hero-command-tab.active::after {
224
- background: #{mg.ref("color-accent")};
187
+ @include mixins.tab;
225
188
  }
226
189
 
227
190
  // Same panel, dropped under the text instead of beside it — an image already claims the
@@ -267,7 +230,7 @@
267
230
 
268
231
  .ff-hero-command code {
269
232
  font-family: #{mg.ref("font-mono")};
270
- font-size: 0.8125rem;
233
+ font-size: #{mg.ref("size-small")};
271
234
  color: #{mg.ref("color-ink")};
272
235
  overflow-x: auto;
273
236
  }
@@ -390,9 +353,9 @@
390
353
  .ff-hero-meta dd {
391
354
  margin: 0;
392
355
  font-family: #{mg.ref("font-display")};
393
- font-size: 1.125rem;
356
+ font-size: #{mg.ref("size-lead")};
394
357
  font-weight: 600;
395
- letter-spacing: -0.01em;
358
+ letter-spacing: #{mg.ref("tracking-tight")};
396
359
  color: #{mg.ref("color-ink")};
397
360
  }
398
361
 
@@ -437,7 +400,7 @@
437
400
  padding: 0 1.375rem;
438
401
  border: #{mg.ref("rule-width")} solid transparent;
439
402
  border-radius: #{mg.ref("radius-sm")};
440
- font-size: 0.875rem;
403
+ font-size: #{mg.ref("size-ui")};
441
404
  font-weight: 550;
442
405
  text-decoration: none;
443
406
  white-space: nowrap;
@@ -535,9 +498,8 @@
535
498
  font-size: 2rem;
536
499
  font-weight: 500;
537
500
  line-height: 1;
538
- letter-spacing: -0.02em;
501
+ letter-spacing: #{mg.ref("tracking-heading")};
539
502
  color: #{mg.ref("color-rule-strong")};
540
- transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
541
503
  }
542
504
 
543
505
  .ff-feature-linked:hover .ff-feature-index::before {
@@ -558,9 +520,9 @@
558
520
  .ff-feature-title {
559
521
  margin: 2.25rem 0 0;
560
522
  font-family: #{mg.ref("font-display")};
561
- font-size: 1.1875rem;
523
+ font-size: #{mg.ref("size-h3")};
562
524
  font-weight: 620;
563
- letter-spacing: -0.015em;
525
+ letter-spacing: #{mg.ref("tracking-subheading")};
564
526
  color: #{mg.ref("color-ink")};
565
527
  }
566
528
 
@@ -594,7 +556,7 @@
594
556
  flex-grow: 1;
595
557
  margin: 0.75rem 0 0;
596
558
  padding: 0;
597
- font-size: 0.9375rem;
559
+ font-size: #{mg.ref("size-ui-lg")};
598
560
  line-height: 1.7;
599
561
  color: #{mg.ref("color-ink-muted")};
600
562
  }
@@ -739,7 +701,7 @@
739
701
  margin: 0 0 0.25rem;
740
702
  padding: 0 1.25rem;
741
703
  font-family: #{mg.ref("font-mono")};
742
- font-size: 0.875rem;
704
+ font-size: #{mg.ref("size-ui")};
743
705
  font-weight: 500;
744
706
  letter-spacing: #{mg.ref("tracking-label")};
745
707
  text-align: left;
@@ -0,0 +1,63 @@
1
+ // ============================================================================================= //
2
+ // MIXINS //
3
+ // ============================================================================================= //
4
+
5
+ @use "theme" as mg;
6
+
7
+ // The label voice: small uppercase mono, faint. Also the `.ff-label` class.
8
+
9
+ @mixin label {
10
+ font-family: #{mg.ref("font-mono")};
11
+ font-size: #{mg.ref("size-label")};
12
+ font-weight: 500;
13
+ text-transform: uppercase;
14
+ letter-spacing: #{mg.ref("tracking-label")};
15
+ color: #{mg.ref("color-ink-faint")};
16
+ }
17
+
18
+ // A tab in a strip under which the active one carries the accent rule. Shared by the hero panel
19
+ // tabs and the tabs block.
20
+
21
+ @mixin tab {
22
+ @include label;
23
+
24
+ position: relative;
25
+ padding: 0 0.75rem 0.625rem;
26
+ border: 0;
27
+ background: transparent;
28
+ cursor: pointer;
29
+ transition: color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
30
+
31
+ &:first-child {
32
+ padding-left: 0;
33
+ }
34
+
35
+ &::after {
36
+ position: absolute;
37
+ right: 0;
38
+ bottom: calc(#{mg.ref("rule-accent-width")} * -1);
39
+ left: 0;
40
+ height: #{mg.ref("rule-accent-width")};
41
+ background: transparent;
42
+ content: "";
43
+ transition: background-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
44
+ }
45
+
46
+ &:hover,
47
+ &.active {
48
+ color: #{mg.ref("color-ink")};
49
+ }
50
+
51
+ &.active::after {
52
+ background: #{mg.ref("color-accent")};
53
+ }
54
+ }
55
+
56
+ // The page title: the doc h1 and the blog title read as the same voice.
57
+
58
+ @mixin page-title {
59
+ font-size: #{mg.ref("size-h1")};
60
+ font-weight: 620;
61
+ line-height: #{mg.ref("leading-tight")};
62
+ letter-spacing: #{mg.ref("tracking-title")};
63
+ }
@@ -60,29 +60,29 @@
60
60
  }
61
61
 
62
62
  .ff-hero-title {
63
- animation-delay: 0.06s;
63
+ animation-delay: calc(#{mg.ref("motion-stagger")} * 3);
64
64
  }
65
65
 
66
66
  .ff-hero-tagline {
67
- animation-delay: 0.12s;
67
+ animation-delay: calc(#{mg.ref("motion-stagger")} * 6);
68
68
  }
69
69
 
70
70
  .ff-hero-main .ff-hero-actions {
71
- animation-delay: 0.18s;
71
+ animation-delay: calc(#{mg.ref("motion-stagger")} * 9);
72
72
  }
73
73
 
74
74
  .ff-hero-panel {
75
- animation-delay: 0.2s;
76
- animation-duration: 0.8s;
75
+ animation-delay: calc(#{mg.ref("motion-stagger")} * 10);
76
+ animation-duration: #{mg.ref("motion-duration-enter-panel")};
77
77
  }
78
78
 
79
79
  .ff-hero-meta {
80
- animation-delay: 0.3s;
80
+ animation-delay: calc(#{mg.ref("motion-stagger")} * 15);
81
81
  }
82
82
 
83
83
  .ff-hero-image {
84
- animation-delay: 0.14s;
85
- animation-duration: 0.9s;
84
+ animation-delay: calc(#{mg.ref("motion-stagger")} * 7);
85
+ animation-duration: #{mg.ref("motion-duration-enter-image")};
86
86
  }
87
87
 
88
88
  // Nothing else animates on arrival. Revealing cells and cards on scroll was tried and
@@ -125,7 +125,7 @@
125
125
  right: 0.75rem;
126
126
  bottom: 1rem;
127
127
  left: 0.75rem;
128
- height: 2px;
128
+ height: #{mg.ref("rule-accent-width")};
129
129
  background: #{mg.ref("color-accent")};
130
130
  transform: scaleX(0);
131
131
  transform-origin: left;
@@ -200,7 +200,7 @@
200
200
  .ff-to-top,
201
201
  .VPNavBarSearchButton,
202
202
  .vp-doc [class*="language-"] > button.copy,
203
- .VPDocFooter .pager-link .title,
203
+ .ff-feedback-button,
204
204
  .ff-footer-column a,
205
205
  .VPDocAsideOutline .outline-link,
206
206
  .VPSidebarItem .link .text {
@@ -227,6 +227,8 @@
227
227
  .ff-to-top,
228
228
  .ff-hero-command-tab,
229
229
  .ff-hero-command-tab::after,
230
+ .vp-doc .ff-tabs-tab,
231
+ .vp-doc .ff-tabs-tab::after,
230
232
  .ff-hero-copy,
231
233
  .VPNavBarMenuLink::after {
232
234
  transition: none;