You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decide how styling works on both platforms before porting 7,200 lines of SCSS. This spike produces a written decision that gates the porting work in #588.
What the decision has to satisfy
This is not a generic "pick a CSS-in-JS library" question. The existing Sass layer does specific things that any replacement must be able to express, and they're the hard requirements to evaluate against:
Responsive typography — apply-text-style (106 uses) takes a map shaped (base: (...), md: (...), lg: (...)) and emits the base properties plus a media query per breakpoint layer. A replacement needs responsive token values, not just responsive layout.
Variant systems with generated states — $button-variants and $list-variants map a variant key to bg/hover/active/disabled, and apply-button-variant / apply-list-variant generate the interaction states from it. apply-list-variant even takes an $is-selected flag that switches the tone. This is logic, and it needs a runtime home.
Breakpoints — 47 responsive rules (40 respond-to, 7 raw @media), with respond-to supporting both up/down directions and raw pixel values.
Composition mixins — page-layout (15 uses) and the list-page-* family (~30 uses) exist so pages share structure. Whatever replaces them needs a composition story.
Colour scales derived at build time — tokens/_colors.scss generates 10-step scales via color.adjust($base, $lightness: ±n%). Either precompute these or find a runtime equivalent.
Options to weigh
Keep CSS Modules for web, write RN styles separately. Two styling layers, shared tokens only. Lowest risk to the existing web app, highest ongoing duplication cost.
Utility/atomic CSS with an RN compiler (e.g. NativeWind-style). One authoring model both platforms understand; means re-expressing the entire layer in utilities and losing the semantic Sass API.
Runtime style objects with a theme (RN StyleSheet + a typed theme, or a themed styling library). Closest conceptual match to the current semantic/variant system, since maps-and-functions translate naturally into objects-and-functions. Needs its own responsive solution.
Evaluate against: the five requirements above, web bundle size and runtime cost, whether it forces the visual result to change, TypeScript support, and how incrementally it can be adopted (can 57 modules migrate in tranches, or is it all-or-nothing?).
Acceptance criteria
Written decision in the repo (.claude/plans/ or docs/): chosen approach, options rejected and why, and how each of the five requirements above is satisfied
Proof of concept migrating two components end to end: one trivial and one using apply-text-style + a variant mixin + a breakpoint, to prove the hard cases rather than the easy one
Visual parity of the proof-of-concept confirmed against current output
Timebox it. The realistic outcome is likely "shared TS tokens + runtime style objects", but the responsive-typography and variant requirements are unusual enough to be worth checking properly rather than assumed.
⚠️ Do this after the two cleanup issues — porting a layer that still has duplicate spacing scales and dead partials just carries the mess across.
Summary
Decide how styling works on both platforms before porting 7,200 lines of SCSS. This spike produces a written decision that gates the porting work in #588.
What the decision has to satisfy
This is not a generic "pick a CSS-in-JS library" question. The existing Sass layer does specific things that any replacement must be able to express, and they're the hard requirements to evaluate against:
apply-text-style(106 uses) takes a map shaped(base: (...), md: (...), lg: (...))and emits the base properties plus a media query per breakpoint layer. A replacement needs responsive token values, not just responsive layout.$button-variantsand$list-variantsmap a variant key to bg/hover/active/disabled, andapply-button-variant/apply-list-variantgenerate the interaction states from it.apply-list-varianteven takes an$is-selectedflag that switches the tone. This is logic, and it needs a runtime home.respond-to, 7 raw@media), withrespond-tosupporting bothup/downdirections and raw pixel values.page-layout(15 uses) and thelist-page-*family (~30 uses) exist so pages share structure. Whatever replaces them needs a composition story.tokens/_colors.scssgenerates 10-step scales viacolor.adjust($base, $lightness: ±n%). Either precompute these or find a runtime equivalent.Options to weigh
StyleSheet+ a typed theme, or a themed styling library). Closest conceptual match to the current semantic/variant system, since maps-and-functions translate naturally into objects-and-functions. Needs its own responsive solution.Evaluate against: the five requirements above, web bundle size and runtime cost, whether it forces the visual result to change, TypeScript support, and how incrementally it can be adopted (can 57 modules migrate in tranches, or is it all-or-nothing?).
Acceptance criteria
.claude/plans/ordocs/): chosen approach, options rejected and why, and how each of the five requirements above is satisfiedapply-text-style+ a variant mixin + a breakpoint, to prove the hard cases rather than the easy oneNotes
Timebox it. The realistic outcome is likely "shared TS tokens + runtime style objects", but the responsive-typography and variant requirements are unusual enough to be worth checking properly rather than assumed.