2.5 KiB
2.5 KiB
2026-03-17 — WebUI Skins Phase 1 Implementation
Scope implemented
Phase 1 from the skins plan is now implemented:
- Skin/readability state management and persistence.
- CSS data-attribute foundation (
data-skin,data-readability) with semantic UI tokens. - Settings UI controls for selecting skin and readability profile.
- Non-breaking integration with existing theme/accent/font behavior.
Files changed
frontend/src/utils/appearance.tsfrontend/src/App.tsxfrontend/src/pages/Settings.tsxfrontend/src/index.css
What changed
1) Appearance utilities
Added new exported options and helpers:
SKIN_OPTIONSREADABILITY_OPTIONSapplySkin()applyReadability()applySavedAppearance()
Also added dyslexia-friendly font support:
atkinsonfont entry (Atkinson Hyperlegible) inFONT_OPTIONSand lazy loader map.
Persistence keys:
stemengine-skinstemengine-readability
2) App initialization
App.tsx now calls applySavedAppearance() on startup.
Result: saved font, accent, skin, and readability all re-apply on reload.
3) Settings UI (Appearance tab)
Added two new control groups:
- Skin
- Readability Profile
Behavior:
- Selecting readability =
dyslexiaapplies dataset mode immediately. - If readability switches to dyslexia while font is still
system, UI auto-switches toatkinsonto improve readability by default.
4) CSS foundation in index.css
Added semantic tokens and presets:
- Base semantic tokens:
--ui-bg,--ui-surface,--ui-text,--ui-border, etc. - Skin selectors:
[data-skin="studio-dark"][data-skin="high-contrast"][data-skin="paper-light"][data-skin="dyslexia-friendly"]
- Readability selector:
[data-readability="dyslexia"]
Added typography variables to body:
--ui-font-size--ui-line-height--ui-letter-spacing--ui-word-spacing
This establishes the token layer without forcing a full component migration yet.
Out of scope (next phases)
- Full component migration from static slate/gray utility colors to semantic token-driven classes.
- Contrast-focused QA matrix for every major page in every skin.
- Preview card and reset button UX enhancements in Appearance settings.
Validation notes
- Existing light/dark/system behavior remains handled by
ThemeContext. - Existing accent behavior remains unchanged.
- Existing font selection behavior remains unchanged (plus Atkinson option).
- New settings persist through localStorage and re-apply on load.