diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-09 05:11:51 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-09 05:11:51 -0500 |
| commit | 5e700fb7869bca9ce9d5e56e793763ad91fe504b (patch) | |
| tree | d67b156ec8519c0a4339f5451e7cd7de475f1aa3 /scripts/theme-studio/README.md | |
| parent | 5cbe268526e9a80c449f24accbdffe2dd89a0849 (diff) | |
| download | dotemacs-5e700fb7869bca9ce9d5e56e793763ad91fe504b.tar.gz dotemacs-5e700fb7869bca9ce9d5e56e793763ad91fe504b.zip | |
refactor(theme-studio): extract crHtml and mkStyleButtons table helpers
Three tables repeated two scaffolds. The contrast-cell readout (a WCAG ratio colored by its AA/AAA rating, plus the rating word) was copy-pasted at five sites; pulled the shared formatting into crHtml(r) and called it from the syntax, UI, and package cells (the picker readout renders differently and stays as is). The B/I/U/S style-button loop was duplicated near-verbatim in the UI and package tables; pulled it into mkStyleButtons(isOn, onToggle), which returns the button list so the caller still hands them to mkLockCell.
Left the syntax table's bold/italic buttons alone — two buttons, a different state model (the BOLD/ITALIC dicts), and an in-place refresh closure make it a poor fit for the same helper. Didn't introduce a shared row scaffold either; the three tables differ enough in columns and order that one would leak.
Behavior-preserving: the runtime-rendered tables are byte-identical to before (a DOM dump diff shows only the inline-script source changing, never a built tr/td/button/span). All hash gates, the node suite, and #locktest stay green.
Diffstat (limited to 'scripts/theme-studio/README.md')
0 files changed, 0 insertions, 0 deletions
