polish(ui): tighter header gap, stronger row hover, readable tag chips (R13 S3)
- Channel-manager tab row: pt-4 -> pt-2, closing the too-wide gap under the fixed header. - Row hover was barely visible (--card sits close to --bg in dark schemes). New shared --hover token (a 9% foreground mix, clear in every scheme + theme, auto-adapting via --fg); the .selectable recipe and the DataTable row both use it, so every hoverable row app-wide (tables, nav rail, menu rows) reads. - Channel tag chips: text-3xs -> text-2xs + font-medium, so the tiny labels stay legible on the accent fill across all colour schemes. Self-E2E'd: tighter gap, a table-row hover now clearly visible. gate green (tsc/eslint-0/vitest 147/knip/prettier/build).
This commit is contained in:
@@ -22,7 +22,8 @@ interface TagChipProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TagChip({ tag, onClick, title }: TagChipProps) {
|
function TagChip({ tag, onClick, title }: TagChipProps) {
|
||||||
const cls = "chip-solid shrink-0 text-3xs px-1.5 py-0.5 rounded-full max-w-36 truncate";
|
const cls =
|
||||||
|
"chip-solid shrink-0 text-2xs font-medium px-1.5 py-0.5 rounded-full max-w-36 truncate";
|
||||||
return onClick ? (
|
return onClick ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ export default function Channels() {
|
|||||||
[t],
|
[t],
|
||||||
);
|
);
|
||||||
const tabs = (
|
const tabs = (
|
||||||
<div className="px-4 pt-4 max-w-384 mx-auto flex items-center justify-between gap-4 flex-wrap">
|
<div className="px-4 pt-2 max-w-384 mx-auto flex items-center justify-between gap-4 flex-wrap">
|
||||||
<Tabs
|
<Tabs
|
||||||
tabs={viewTabs}
|
tabs={viewTabs}
|
||||||
active={view}
|
active={view}
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ export default function DataTable<T>({
|
|||||||
{paged.map((row) => (
|
{paged.map((row) => (
|
||||||
<tr
|
<tr
|
||||||
key={rowKey(row)}
|
key={rowKey(row)}
|
||||||
className={`border-b border-border/50 hover:bg-card/40 transition ${
|
className={`border-b border-border/50 hover:bg-(--hover) transition ${
|
||||||
rowClassName?.(row) ?? ""
|
rowClassName?.(row) ?? ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -294,6 +294,11 @@ html {
|
|||||||
jitter at DPR=1. round() keeps the font-scale feature but quantises to crisp integer metrics. */
|
jitter at DPR=1. round() keeps the font-scale feature but quantises to crisp integer metrics. */
|
||||||
font-size: round(calc(16px * var(--font-scale)), 1px);
|
font-size: round(calc(16px * var(--font-scale)), 1px);
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
|
/* Shared interactive-row hover tint. `--card` reads faint in dark schemes (it sits close to `--bg`),
|
||||||
|
so hover was barely visible; a foreground-mix reads clearly in every scheme + theme (it lightens
|
||||||
|
on dark, darkens on light) and adapts automatically since --fg is per-scheme. One source for every
|
||||||
|
hoverable row (the .selectable recipe + DataTable rows). */
|
||||||
|
--hover: color-mix(in srgb, var(--fg) 9%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -414,7 +419,7 @@ body {
|
|||||||
color 0.15s ease;
|
color 0.15s ease;
|
||||||
}
|
}
|
||||||
.selectable:hover {
|
.selectable:hover {
|
||||||
background-color: var(--card);
|
background-color: var(--hover);
|
||||||
}
|
}
|
||||||
.selectable:focus-visible {
|
.selectable:focus-visible {
|
||||||
/* outline (not a box-shadow ring) so it never fights a glass surface's box-shadow and never gets
|
/* outline (not a box-shadow ring) so it never fights a glass surface's box-shadow and never gets
|
||||||
|
|||||||
Reference in New Issue
Block a user