Skip to content

Commit e4412ac

Browse files
KSemenenkoclaude
andcommitted
Soften benchmark table edge fades and fit the results table on phones
The pinned-column shade was a grey band that read as a smear over the values. Values now fade into the row's own background beside the pinned column, matching the far-edge fade, including hovered and KeyLoad rows. Both fades scale with the viewport. On phones the results table pinned engine plus node columns left almost no room for values, so the engine column narrows to 7.5rem and wraps long names. Verified: node site/scripts/build.mjs --benchmarks=none (CSS 13,456 of 20,480 gzip bytes), and a 127.0.0.1 preview with the published data at 1100 and 375 px for both tables scrolled to start, middle and end. The Website TUnit browser suite runs only in GitHub Actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3d7ba37 commit e4412ac

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎site/Features/BenchmarkComparisons/styles.css‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ h1 .kl-mark { background-size: 100% .07em; background-position: 0 98%; }
317317
.bench-details summary::after { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--chevron) center / contain no-repeat; mask: var(--chevron) center / contain no-repeat; transition: transform .3s var(--kl-ease); }
318318
.bench-details[open] summary::after { transform: rotate(180deg); }
319319
.bench-details[open] summary { margin-bottom: 1rem; }
320-
/* Horizontal regions shade the pinned edge once columns pass beneath it and fade the far edge while more columns remain. */
320+
/* Values fade into the pinned column once they pass beneath it and into the far edge while more columns remain. */
321321
.scroll-frame { position: relative; min-width: 0; }
322-
.scroll-frame::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: 4.5rem; background: linear-gradient(to left, var(--kl-surface-solid) 8%, transparent); opacity: 0; pointer-events: none; transition: opacity .25s var(--kl-ease); }
322+
.scroll-frame::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: min(4.5rem, 12vw); background: linear-gradient(to left, var(--kl-surface-solid) 8%, transparent); opacity: 0; pointer-events: none; transition: opacity .25s var(--kl-ease); }
323323
.bench-overview .scroll-frame::after { bottom: .5rem; }
324324
.bench-details .scroll-frame::after { inset: 1px 1px 1px auto; border-radius: 0 var(--kl-radius) var(--kl-radius) 0; }
325325
.scroll-frame.more-end::after { opacity: 1; }
326-
.comparison-grid tr > :first-child::after, .pin-nodes::after { content: ""; position: absolute; top: 0; bottom: -1px; left: 100%; width: 1.4rem; background: linear-gradient(90deg, rgba(28, 24, 44, .1), transparent); opacity: 0; pointer-events: none; transition: opacity .25s var(--kl-ease); }
326+
.comparison-grid tr > :first-child::after, .pin-nodes::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: min(3rem, 9vw); background: linear-gradient(90deg, var(--row, var(--kl-surface-solid)) 10%, transparent); opacity: 0; pointer-events: none; transition: opacity .25s var(--kl-ease); }
327327
.more-start .comparison-grid tr > :first-child::after, .more-start .pin-nodes::after { opacity: 1; }
328328
/* Results table: engine and node count stay pinned while the values scroll. */
329329
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--kl-line); border-radius: var(--kl-radius); background: var(--kl-surface-solid); scrollbar-color: var(--kl-line-strong) transparent; scrollbar-width: thin; }
@@ -340,7 +340,8 @@ h1 .kl-mark { background-size: 100% .07em; background-position: 0 98%; }
340340
.table-scroll th.pin-nodes, .table-scroll td.pin-nodes { padding-inline: .8rem; color: var(--kl-ink-2); text-align: center; }
341341
.table-scroll td.pin:first-child { font-weight: 600; }
342342
.table-scroll td:nth-child(3) { min-width: 10rem; max-width: 10rem; color: var(--kl-ink-2); font-size: .74rem; white-space: normal; }
343-
.table-scroll tbody tr:hover td { background-color: color-mix(in srgb, #6f5cf0 10%, var(--kl-surface-solid)); }
343+
.table-scroll tbody tr:hover { --row: color-mix(in srgb, #6f5cf0 10%, var(--kl-surface-solid)); }
344+
.table-scroll tbody tr:hover td { background-color: var(--row); }
344345
.table-scroll tr:last-child td { border-bottom: 0; }
345346
.table-scroll td[data-value=""] { color: var(--kl-faint); }
346347
.table-links { display: flex; gap: .8rem; }
@@ -416,6 +417,8 @@ h1 .kl-mark { background-size: 100% .07em; background-position: 0 98%; }
416417

417418
@media (max-width: 760px) {
418419
.comparison-grid { --pin: 8.75rem; --col: 8.75rem; }
420+
.table-scroll table { --pin-name: 7.5rem; }
421+
.table-scroll td.pin:first-child { white-space: normal; }
419422
.bench-controls fieldset { padding-left: 0; }
420423
.bench-legend { position: static; margin-bottom: -1.2rem; }
421424
.leaders { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(15.5rem, 82%); margin-inline: calc(-1 * clamp(1rem, 2.4vw, 2rem)); padding: .2rem clamp(1rem, 2.4vw, 2rem) .6rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }

0 commit comments

Comments
 (0)