diff --git a/web/src/features/blocklists/BlocklistsPage.tsx b/web/src/features/blocklists/BlocklistsPage.tsx
index b194762..320202c 100644
--- a/web/src/features/blocklists/BlocklistsPage.tsx
+++ b/web/src/features/blocklists/BlocklistsPage.tsx
@@ -69,9 +69,6 @@ const styles = stylex.create({
textOverflow: "ellipsis",
whiteSpace: "nowrap",
},
- numeric: {
- fontVariantNumeric: "tabular-nums",
- },
actions: {
display: "flex",
gap: "0.75rem",
@@ -186,9 +183,9 @@ export default function BlocklistsPage() {
{...stylex.props(shared.focusRing)}
/>
-
{b.domain_count} |
- {b.wildcard_count} |
- {b.skipped_regex_count} |
+ {b.domain_count} |
+ {b.wildcard_count} |
+ {b.skipped_regex_count} |
{b.last_updated === null ? "never" : formatTime(b.last_updated)}
|
diff --git a/web/src/features/dashboard/StatCards.tsx b/web/src/features/dashboard/StatCards.tsx
index cd4cb31..f84e8a2 100644
--- a/web/src/features/dashboard/StatCards.tsx
+++ b/web/src/features/dashboard/StatCards.tsx
@@ -1,8 +1,49 @@
+import * as stylex from "@stylexjs/stylex";
import { formatMicros } from "@/lib/format";
import type { StatsTotals } from "@/lib/types";
+import { styles as shared } from "@/ui/styles";
+import { colors } from "@/ui/tokens.stylex";
const numberFormat = new Intl.NumberFormat();
+const styles = stylex.create({
+ /** Two columns on a phone, three from `md`, five from `xl`, as before. */
+ grid: {
+ display: "grid",
+ gap: "0.75rem",
+ gridTemplateColumns: {
+ default: "repeat(2, minmax(0, 1fr))",
+ "@media (min-width: 768px)": "repeat(3, minmax(0, 1fr))",
+ "@media (min-width: 1280px)": "repeat(5, minmax(0, 1fr))",
+ },
+ },
+ card: {
+ borderRadius: "0.25rem",
+ borderWidth: 1,
+ borderStyle: "solid",
+ borderColor: colors.border,
+ backgroundColor: colors.surfaceRaised,
+ paddingInline: "1rem",
+ paddingBlock: "0.75rem",
+ },
+ label: {
+ fontSize: "0.875rem",
+ lineHeight: "1.25rem",
+ color: colors.textMuted,
+ },
+ value: {
+ fontSize: "1.5rem",
+ lineHeight: "2rem",
+ fontWeight: 600,
+ },
+ detail: {
+ marginLeft: "0.5rem",
+ fontSize: "0.875rem",
+ lineHeight: "1.25rem",
+ color: colors.textMuted,
+ },
+});
+
function percentOf(part: number, total: number): string | null {
if (total === 0) return null;
return `${((part / total) * 100).toFixed(1)}%`;
@@ -10,11 +51,11 @@ function percentOf(part: number, total: number): string | null {
function Card({ label, value, detail }: { label: string; value: string; detail?: string | null }) {
return (
-
-
{label}
+
+
{label}
- {value}
- {detail != null && {detail}}
+ {value}
+ {detail != null && {detail}}
);
@@ -22,7 +63,7 @@ function Card({ label, value, detail }: { label: string; value: string; detail?:
export default function StatCards({ stats }: { stats: StatsTotals }) {
return (
-
+
- | {u.priority} |
+ {u.priority} |
|