Skip to content

Space questions, labels, errors and groups by relationship - #55

Merged
aharlap merged 8 commits into
mainfrom
feat/spacing
Oct 23, 2026
Merged

aharlap merged 8 commits into
mainfrom
feat/spacing

Conversation

@aharlap

@aharlap aharlap commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Applies the approved spacing proposal to lib/base.css, so a question sits with its field and groups separate.

  • Five rem scale steps and seven relationship tokens. Most systems (GOV.UK, USWDS, Carbon, Material, Polaris) leave 3 to 6 times more space between field groups than between a label and its field.
  • One stack flow rule, plus pair rules that work whatever element wraps the pair: question to field 12px (was 0 when the pair sat in a plain div), label to field 8px (was 6), field to error 8px (was 0), group to group 24px (was 16).
  • Choices and run-in summaries use 1.4 line height; legends keep their 12px margin.
  • Deletes rules the shared ones now cover: three error margins (retrieval-sheet, write-distractors) and test-out's panel flow and first-panel resets. test-out keeps a zero top margin on the status that shares its title's flex row.
  • AGENTS.md: conversation's role line under the person's name is a documented exception to the one-title header rule, because who the learner is talking to changes what a good reply is. The header guard test allows that one role and still fails a planted subtitle elsewhere.

Tests: computed gaps on real pattern markup at 1280 and 390; English and French at 320px with and without WCAG 1.4.12 text spacing; forced colours. The spacing spec failed on the old CSS (13 of 15).

Checks: npm test (412), typecheck, types:check, budget, demo. Browser specs run in CI.

Review: 1/6/6 0/2/4; fixes 3. Sol and Opus at 620a079 and 8fba23d; fixes in 84757e4, 825bc1f, 8fba23d, c1ebaeb and c4ad5c9. Deferred: inner px gaps in seven pattern stylesheets, narrow scene gap, test-out counter role (backlog).

🤖 Generated with Claude Code

@aharlap
aharlap marked this pull request as ready for review October 23, 2026 04:59
@aharlap
aharlap merged commit f4c7e0e into main Oct 23, 2026
2 checks passed
@aharlap
aharlap deleted the feat/spacing branch October 23, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant