Universal Checklist Styling
Summary
Implement the universal checklist dimension: detect [x]/[ ]/[>]/[-] checkbox markers in list items during the identity transform, emit data-checked attributes, and write universal Lumina CSS. This replaces per-rune checkbox styling duplication (plot beats, comparison rows) and adds visual checkbox treatment to runes that currently lack it (work/bug acceptance criteria).
Acceptance Criteria
- Identity transform detects checkbox markers (
[x],[ ],[>],[-]) at the start of list item text content - Detected markers are stripped from rendered text output
data-checkedattribute emitted on<li>elements with values:checked,unchecked,active,skipped- Optional
checklist: trueflag onRuneConfigenables detection on all lists within a rune (not just standard task list items) - Lumina CSS:
[data-checked]base rules (padding, indicator position),[data-checked="checked"](success colour, muted text),[data-checked="unchecked"](empty indicator),[data-checked="active"](primary colour, emphasis ring),[data-checked="skipped"](muted, strikethrough) - Density interaction CSS: compact shrinks indicators, minimal hides text
- Plot beats emit
data-checkedalongside existing BEM status modifiers — existing dot/timeline styling preserved via BEM specificity - Work/bug acceptance criteria lists get checkbox indicators without any schema changes
- Comparison check/cross rows get
data-checkedalongside existing row-type styling - CSS coverage tests updated for all new
[data-checked]selectors ThemeConfig/RuneConfigtypes updated with optionalchecklistfield
Approach
Transform layer (packages/transform/)
Add checkbox marker detection to the identity transform's list item processing in engine.ts. When walking list items, check if the first text node starts with a marker pattern (/^\[(x|>|\s|-)\]\s*/). If found, strip the marker text and set data-checked on the <li> element.
The detection should run for all list items by default — checkbox markers in Markdown are an intentional authoring pattern, so false positives are unlikely. The checklist: true config flag is for documentation/discoverability rather than gating.
Rune migration
- Plot: The beat content model already extracts markers and maps them to status modifiers. Add a
postTransformstep or adjust the engine to also emitdata-checkedwhen the status modifier is set. The existing BEM classes (.rf-beat--complete, etc.) continue providing the dot/timeline visual; universal checklist rules provide text-level treatment. - Comparison: The
detectRowTypefunction already identifies check/cross rows. Map these todata-checked="checked"/data-checked="unchecked"on the output elements. - Work/Bug: No schema changes needed. The identity transform processes body content list items generically, so acceptance criteria lists get
data-checkedautomatically.
Lumina CSS (packages/lumina/styles/dimensions/checklist.css)
Write ~6 rules matching the CSS in SPEC-025's Checklist section. Import in packages/lumina/index.css. Use design tokens throughout.
Types (packages/transform/src/types.ts)
Add optional checklist?: boolean to RuneConfig.
References
- SPEC-025 (Universal Theming Dimensions — Checklist section)
- WORK-067 (Lumina Universal Dimension CSS — sibling work item)