From 905e2e3325a68176bba630c8c6500ce7846c24fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Tue, 1 Sep 2026 08:08:05 +0100 Subject: [PATCH] one list of roles, named for what they are MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fonts and Font Sizes are the same four things, so they now read in the same order under the same names — Menu, Titles, Headings, Body — from one list. font_display is the largest statements and font_title is a section heading, which is the reverse of what the words suggest. The labels say what the reader sees. Co-Authored-By: Claude Opus 5 (1M context) --- web/sections/FontSizesTab.tsx | 15 ++++----------- web/sections/LayoutPanel.tsx | 19 ++++++------------- web/sections/roles.ts | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 web/sections/roles.ts diff --git a/web/sections/FontSizesTab.tsx b/web/sections/FontSizesTab.tsx index d048109..4d3e8a8 100644 --- a/web/sections/FontSizesTab.tsx +++ b/web/sections/FontSizesTab.tsx @@ -1,4 +1,5 @@ import { useDevice } from '../DeviceToggle'; +import { ROLES } from './roles'; /** * How big each role is, at the width being edited. @@ -20,14 +21,6 @@ export type FontSizes = Partial> | undefined, key: 'base' | 'md' | 'lg', @@ -69,16 +62,16 @@ export const FontSizesTab = ({ return (
{ROLES.map((role) => { - const current = sizes[role.key]; + const current = sizes[role.size]; const own = current?.[key]; const from = inherited(current, key); return ( -
+
patch({ [key]: event.currentTarget.value || null } as Partial)} + value={draft[font] ?? ''} + onChange={(event) => patch({ [font]: event.currentTarget.value || null } as Partial)} className="h-8 rounded-md border border-input bg-transparent px-2 text-xs" > {/* Not "Default" — the face the stylesheet actually uses, named. Choosing it puts things back rather than setting something new, and now you can see what back is. */} {draft.fonts.map((font) => (