Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

11 — Design System Mapping (Results Module)

Maps every screen surface to 02_Design_Tokens.md (tokens T-) and shared components (03_Component_Library.md). Dark/light parity per 02_Design_Tokens.md §10.


1. Grade band → colour role

Server bands (result.service.ts:130-138) map to semantic roles (light & dark both):

GradeBandRole (light)Role (dark)Text
A+≥ 90success containersuccess containeronSuccessContainer
A≥ 80success containersuccess containeronSuccessContainer
B+≥ 70primary containerprimary containeronPrimaryContainer
B≥ 60primary containerprimary containeronPrimaryContainer
C≥ 50tertiary containertertiary containeronTertiaryContainer
D≥ 40tertiary containertertiary containeronTertiaryContainer
F< 40error containererror containeronErrorContainer
unknown stringstored verbatimsurfaceVariantsurfaceVariantonSurfaceVariant

All chip text labelMedium (≥ 4.5:1, 09_Accessibility_Baseline.md §2).

2. Surface tokens by screen

SurfaceToken (light / dark)Used on
Page backgroundsurfaceall screens
Card / herosurfaceContainerLowS2 hero, S4 card
Table headersurfaceContainerHighS1-T, S4-T
Table zebrasurface / surfaceContainerLowS1-T rows
Table gridlinesoutlineVariantS1-T, S4-T
Field error fillerrorContainerS1 over-max cells
Empty/disabledsurfaceVariantungraded bucket, unknown grade

3. Typography

ElementType style (02_Design_Tokens.md §2)
Screen titleheadlineSmall
S4 grade herodisplaySmall
S4 totalsheadlineMedium mono, tabularFigures()
S1 table numeralsmono 14/400/20, tabularFigures()
LabelslabelMedium onSurfaceVariant
Missing-row textbodyMedium onSurfaceVariant italic
Group headers (S3)titleSmall

4. Spacing / radius / elevation

  • 4 dp grid per 02_Design_Tokens.md §3: table cell padding 8 dp vertical / 12 dp horizontal; card padding 16 dp; screen margins 16 dp.
  • Radius: cards & chips radius-medium (12), table cells 0 (straight grid), dialogs radius-large.
  • Elevation: cards elevation-1 (resting), publish panel elevation-2, save bar elevation-2 (fixed bottom), dialog elevation-3.
  • Touch targets ≥ 48×48 dp for all interactive cells (09_Accessibility_Baseline.md §3).

5. Iconography

IconWhere
editS1 rows, S2 "Enter marks"
check_circle / schedulesaved / draft status chips
lockpublished-locked rows
cloud_offoffline banner
bar_chartS5 distribution
campaignpublish action
download / shareS4 actions ((planned) PDF)

6. Breakpoints & layout mapping

WidthS1S4S5
< 600 pxcards layout, save bar fixedstacked, table → labelled rowsbars stack vertical
600–719 pxcards layout, save bar inlinetwo-column totalsstacked bars
≥ 720 pxfull tabletwo-column card + tableside-by-side chart grid

7. Dark/light parity notes

  • Identical structure both modes; only role pairs swap (02_Design_Tokens.md §1).
  • Gridlines outlineVariant differ per mode (#C4C7C5 light / #444746 dark) — never hardcode.
  • Grade chips use the same role mapping in both modes (verified contrast per mode).