From 42144c1cc9a1bb1a013de137b3624d8a39693150 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Thu, 29 Oct 2026 11:10:19 -0400 Subject: [PATCH] The masthead, the scrim, the quiet button and the colophon are styled once in app.css instead of pasted into each page and slip with drifting paddings; the style blocks of the play page and the board are indented like the rest of the files; and comments in script and CSS say what the code does or guards, in plain words, where they had been written in the game's own voice Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_0141G6xqLeNRYEtviLWSB5Up --- src/app.css | 94 +++++++ src/lib/components/About.svelte | 20 +- src/lib/components/Announcement.svelte | 12 +- src/lib/components/Board.svelte | 346 ++++++++++++------------- src/lib/components/Hall.svelte | 49 ++-- src/lib/components/ReportSlip.svelte | 15 -- src/lib/components/Roster.svelte | 4 +- src/lib/components/SeatsSlip.svelte | 14 +- src/lib/components/TableTalk.svelte | 12 +- src/lib/components/Tally.svelte | 8 +- src/lib/family.ts | 9 +- src/lib/game/client.ts | 8 +- src/lib/game/duel.svelte.ts | 14 +- src/lib/game/state.ts | 2 +- src/lib/game/talk.ts | 2 +- src/lib/game/tally.ts | 6 +- src/lib/game/view.ts | 8 +- src/routes/join/[code]/+page.svelte | 105 +------- src/routes/play/+page.svelte | 117 ++------- 19 files changed, 364 insertions(+), 481 deletions(-) diff --git a/src/app.css b/src/app.css index 721760f..7b14ae8 100644 --- a/src/app.css +++ b/src/app.css @@ -108,6 +108,100 @@ button:disabled { background: #fff; } +/* The smaller reveal used in forms and slips. Qualified with the element so it + outranks a component's scoped `.small` text rule on the same button. */ +button.reveal.small { + padding: 0.4rem 0.9rem; + font-size: 1rem; +} + +/* A secondary action: an outlined button or link. */ +.quiet { + background: none; + border: 1px solid var(--rule-strong); + border-radius: 4px; + padding: 0.4rem 0.9rem; + white-space: nowrap; + color: var(--bone); + text-decoration: none; + line-height: 1.55; +} + +.quiet:hover:not(:disabled) { + border-color: var(--bone); +} + +/* The page head on the play and join pages: title and standfirst on the left, actions on the right. */ +.masthead { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 1rem; + padding: 1rem var(--gutter) 0.6rem; + max-width: 1280px; + margin: 0 auto; +} + +.masthead h1 { + font-size: clamp(2rem, 4vw, 2.7rem); + font-weight: 300; + font-variation-settings: 'opsz' 144; + letter-spacing: -0.01em; +} + +.standfirst { + max-width: 38em; + color: var(--bone-dim); + margin-top: 0.4rem; +} + +.standfirst em { + color: var(--bone); +} + +.masthead .actions { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + flex-shrink: 0; + min-width: 0; + max-width: 100%; +} + +.colophon { + max-width: 1280px; + margin: 0 auto; + padding: 2rem var(--gutter) 3rem; + color: var(--bone-faint); + font-size: 0.85rem; +} + +.colophon a { + color: var(--frost); +} + +/* Must match COMPACT_QUERY in duel.svelte.ts. The extra foot padding clears MobileBar. */ +@media (max-width: 860px) { + .masthead { + flex-direction: column; + } + + .colophon { + padding-bottom: 6rem; + } +} + +/* A modal backdrop that centres its dialog. */ +.scrim { + position: fixed; + inset: 0; + z-index: 20; + background: rgba(0, 0, 0, 0.55); + display: grid; + place-items: center; + padding: 16px; +} + /* An italic prompt beside a control, e.g. "at" before a target list. */ .field { display: inline-flex; diff --git a/src/lib/components/About.svelte b/src/lib/components/About.svelte index 505b7ab..f172e35 100644 --- a/src/lib/components/About.svelte +++ b/src/lib/components/About.svelte @@ -10,10 +10,10 @@