fix overlay transisiton and better perofamnce sticky table

This commit is contained in:
tresabhi committed 2026-11-21 00:12:39 -06:00
1 parent 429f856f19
commit 8b9418715c
5 files changed
+8 -33

No files matched your search

@@ -178,6 +178,8 @@ const strings = await api.strings(locale);
background-color: transparent;
transition-duration: var(--duration-brief);
#navbar-mobile[data-expanded="true"] ~ & {
pointer-events: auto;
background-color: var(--black-a8);
@@ -1,20 +1,5 @@
/* Spans the page even when the columns would fit in less */
.root {
--tank-width: 15rem;
width: 100%;
/* Fixed layout keeps stat columns equal. Fixed tables ignore cell minimums, so the table holds 8rem per stat column and scrolls past that */
table {
table-layout: fixed;
width: 100%;
min-width: calc(var(--tank-width) + var(--columns) * 8rem);
}
}
.corner {
box-sizing: border-box;
width: var(--tank-width);
overflow-x: auto;
}
.value {
@@ -25,7 +10,6 @@
width: 100%;
}
/* Table cells ignore max-width, so the link inside caps the column instead */
.tank {
display: flex;
align-items: center;
@@ -10,7 +10,6 @@ import {
useMemo,
useRef,
useState,
type CSSProperties,
} from "react";
import { api } from "../../api/dynamic";
import {
@@ -103,11 +102,7 @@ export function PerformanceTable() {
}
return (
<Table.Root
scrollable
className={styles.root}
style={{ "--columns": performanceStatNames.length } as CSSProperties}
>
<Table.Root className={styles.root}>
<Head />
<Body filtered={filtered} />
</Table.Root>
@@ -118,7 +113,7 @@ function Head() {
return (
<Table.Head>
<Table.Row>
<Table.IconCorner className={styles.corner} />
<Table.IconCorner />
{performanceStatNames.map((name) => (
<ColumnHeader key={name} name={name} />
@@ -4,7 +4,8 @@
border: var(--space-0) solid var(--gray-a5);
border-radius: var(--space-3);
overflow: hidden;
/* Clips the corners without becoming a scroll container, so sticky headers follow the page */
overflow: clip;
}
.table {
@@ -20,7 +21,7 @@
/* Row dividers sit inside the cells, so they take no space. Borders on a row itself don't paint with separate borders, so rows apply them to their cells here */
tbody tr > * {
box-shadow: inset 0 var(--space-0) var(--gray-5);
box-shadow: inset 0 var(--space-0) var(--white-a2);
}
.column-header {
@@ -1,11 +1,7 @@
.page {
/* Fixed to the viewport so the table scrolls, not the page */
height: 100dvh;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
.top {
display: flex;
@@ -17,10 +13,7 @@
}
.table {
flex: 1;
min-height: 0;
align-self: stretch;
overflow: hidden;
display: flex;
justify-content: center;