mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-21 12:53:56 +01:00
fix overlay transisiton and better perofamnce sticky table
This commit is contained in:
5 files changed
+8
-33
No files matched your search
@@ -178,6 +178,8 @@ const strings = await api.strings(locale);
|
|||||||
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
|
transition-duration: var(--duration-brief);
|
||||||
|
|
||||||
#navbar-mobile[data-expanded="true"] ~ & {
|
#navbar-mobile[data-expanded="true"] ~ & {
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
background-color: var(--black-a8);
|
background-color: var(--black-a8);
|
||||||
|
|||||||
@@ -1,20 +1,5 @@
|
|||||||
/* Spans the page even when the columns would fit in less */
|
|
||||||
.root {
|
.root {
|
||||||
--tank-width: 15rem;
|
overflow-x: auto;
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
@@ -25,7 +10,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Table cells ignore max-width, so the link inside caps the column instead */
|
|
||||||
.tank {
|
.tank {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {
|
|||||||
useMemo,
|
useMemo,
|
||||||
useRef,
|
useRef,
|
||||||
useState,
|
useState,
|
||||||
type CSSProperties,
|
|
||||||
} from "react";
|
} from "react";
|
||||||
import { api } from "../../api/dynamic";
|
import { api } from "../../api/dynamic";
|
||||||
import {
|
import {
|
||||||
@@ -103,11 +102,7 @@ export function PerformanceTable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table.Root
|
<Table.Root className={styles.root}>
|
||||||
scrollable
|
|
||||||
className={styles.root}
|
|
||||||
style={{ "--columns": performanceStatNames.length } as CSSProperties}
|
|
||||||
>
|
|
||||||
<Head />
|
<Head />
|
||||||
<Body filtered={filtered} />
|
<Body filtered={filtered} />
|
||||||
</Table.Root>
|
</Table.Root>
|
||||||
@@ -118,7 +113,7 @@ function Head() {
|
|||||||
return (
|
return (
|
||||||
<Table.Head>
|
<Table.Head>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.IconCorner className={styles.corner} />
|
<Table.IconCorner />
|
||||||
|
|
||||||
{performanceStatNames.map((name) => (
|
{performanceStatNames.map((name) => (
|
||||||
<ColumnHeader key={name} name={name} />
|
<ColumnHeader key={name} name={name} />
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
border: var(--space-0) solid var(--gray-a5);
|
border: var(--space-0) solid var(--gray-a5);
|
||||||
border-radius: var(--space-3);
|
border-radius: var(--space-3);
|
||||||
overflow: hidden;
|
/* Clips the corners without becoming a scroll container, so sticky headers follow the page */
|
||||||
|
overflow: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table {
|
.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 */
|
/* 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 > * {
|
tbody tr > * {
|
||||||
box-shadow: inset 0 var(--space-0) var(--gray-5);
|
box-shadow: inset 0 var(--space-0) var(--white-a2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.column-header {
|
.column-header {
|
||||||
|
|||||||
-7
@@ -1,11 +1,7 @@
|
|||||||
.page {
|
.page {
|
||||||
/* Fixed to the viewport so the table scrolls, not the page */
|
|
||||||
height: 100dvh;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -17,10 +13,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table {
|
.table {
|
||||||
flex: 1;
|
|
||||||
min-height: 0;
|
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in new issue
Block a user