ReviewOS

home-lang/home-os

crosswind → HIG tokens: resolve utility classes in `.stx` to `hig-tokens.home` values at compile time (spacing, type scale, colour roles, radii, motion); no CSS parser or stylesheet on the device

#90
Open chris opened this 8 days ago ·
8 days ago

Epic: #113 · Milestone: MC7 — TV shell

Why

crosswind (= ts-css) generates CSS and has a parser/walker but no layout/paint engine; on device we have Craft's layout and HIG tokens (docs/design/hig-tokens.home, TV profile from #50). The bridge lets designers keep writing class="p-6 text-title bg-surface rounded-xl" while the emitter turns that into token references — anything not expressible as a token is a compile error, which is also how the HIG stays enforced.

Tasks

  • Token map: crosswind theme (spacing scale, font sizes, colours, radii, shadows, durations) generated from hig-tokens.home (single source of truth) via a small script in tools/hig/.
  • In the stx home emitter: class list → Craft style struct; layout classes (flex, grid-cols-N, gap-N, items-center) → Craft layout params; responsive/hover/dark variants rejected or mapped (focus: → Craft focus style, dark: ignored — TV is dark-only).
  • crosswind's css.create() typed objects supported the same way for component-scoped styles.
  • Lint rule in pickier config for apps/tv/**/*.stx: raw hex/px values are errors.

Acceptance

All classes used by the v1 screens resolve; a PR introducing bg-[#123456] fails CI with a pointer to the token doc.

Size: S · Depends on: #50, #89 · Blocks: #92

Sign in to comment on this issue.