vocs 2.7.2 → 2.8.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.
@@ -393,6 +393,99 @@ div[data-v-table-wrapper] {
393
393
 
394
394
  /* #endregion */
395
395
 
396
+ /* #region Benchmarks */
397
+
398
+ div[data-v-benchmarks] {
399
+ @apply vocs:mb-6;
400
+
401
+ & div[data-v-table-wrapper] {
402
+ @apply vocs:mb-0;
403
+ }
404
+
405
+ & table[data-v] {
406
+ & th[data-v-benchmarks-col]:not([align="left"]) {
407
+ @apply vocs:text-center;
408
+ }
409
+
410
+ & td[data-v-benchmarks-cell] {
411
+ @apply vocs:text-center vocs:tabular-nums vocs:whitespace-nowrap vocs:relative vocs:isolate;
412
+
413
+ /* Tint an inset layer instead of the cell so the background doesn't
414
+ bleed to the cell edges. */
415
+ &::before {
416
+ content: "";
417
+ position: absolute;
418
+ inset: 3px;
419
+ z-index: -1;
420
+ }
421
+ }
422
+
423
+ & td[data-v-benchmarks-cell="baseline"] {
424
+ @apply vocs:text-secondary;
425
+
426
+ &::before {
427
+ border: 1px dashed var(--vocs-border-color-primary);
428
+ }
429
+ }
430
+
431
+ & td[data-v-benchmarks-cell="neutral"]::before {
432
+ background-color: var(--vocs-background-color-surfaceTint);
433
+ }
434
+
435
+ & td[data-v-benchmarks-cell="faster"]::before {
436
+ background-color: color-mix(
437
+ in srgb,
438
+ var(--vocs-color-green) calc(6% + var(--vocs-benchmarks-intensity, 0) * 42%),
439
+ var(--vocs-background-color-surfaceTint)
440
+ );
441
+ }
442
+
443
+ & td[data-v-benchmarks-cell="slower"]::before {
444
+ background-color: color-mix(
445
+ in srgb,
446
+ var(--vocs-color-red) calc(6% + var(--vocs-benchmarks-intensity, 0) * 42%),
447
+ var(--vocs-background-color-surfaceTint)
448
+ );
449
+ }
450
+
451
+ & td[data-v-benchmarks-cell="missing"] {
452
+ @apply vocs:text-muted;
453
+
454
+ &::before {
455
+ background-image: repeating-linear-gradient(
456
+ -45deg,
457
+ color-mix(in srgb, var(--vocs-text-color-muted) 12%, transparent) 0 4px,
458
+ transparent 4px 8px
459
+ );
460
+ }
461
+ }
462
+ }
463
+
464
+ & footer[data-v-benchmarks-legend] {
465
+ @apply vocs:flex vocs:items-center vocs:gap-2 vocs:mt-2 vocs:text-sm vocs:text-muted;
466
+
467
+ & [data-v-benchmarks-legend-scale] {
468
+ @apply vocs:h-2 vocs:w-16;
469
+ background: linear-gradient(
470
+ to right,
471
+ color-mix(in srgb, var(--vocs-color-green) 48%, var(--vocs-background-color-surfaceTint)),
472
+ var(--vocs-background-color-surfaceTint),
473
+ color-mix(in srgb, var(--vocs-color-red) 48%, var(--vocs-background-color-surfaceTint))
474
+ );
475
+ }
476
+
477
+ & [data-v-benchmarks-legend-baseline] {
478
+ @apply vocs:flex vocs:items-center vocs:gap-2 vocs:ms-4;
479
+ }
480
+
481
+ & [data-v-benchmarks-legend-swatch] {
482
+ @apply vocs:inline-block vocs:h-3.5 vocs:w-6 vocs:border vocs:border-dashed vocs:border-primary;
483
+ }
484
+ }
485
+ }
486
+
487
+ /* #endregion */
488
+
396
489
  /* #region Superscript */
397
490
 
398
491
  sup[data-v] > a {