Symptom
@dashforge/tw <Stack> accepts a gap prop typed as string. At runtime, only NUMERIC values from a fixed set are honored: "0" | "0.5" | "1" | "2" | "3" | "4" | "6" | "8" | "12" | "16" | "24". Passing size tokens (gap="xs", "sm", "md", "lg", "xl") is silently ignored — TS accepts the string, runtime falls back to 0, and no warning is emitted.
Why this is bad
- Consumers coming from MUI (
spacing="md") or any design system that speaks size tokens will make this mistake constantly
- Zero signal: TS is happy, no runtime error, no console warning — layout just looks broken
- Cost Blueprint hours to notice: children were rendered flush with no visible reason
Repro
<Stack direction="column" gap="md">
<Chip>a</Chip>
<Chip>b</Chip>
</Stack>
Expected: children separated. Actual: rowGap: normal, children flush.
Discovered while
Refactoring the Blueprint Builder V2 shell. Filed in Blueprint's dogfood report as G-27 (severity: medium — silent-fail DX bug).
Workaround applied in Blueprint
Replaced all gap="xs|sm|md|lg|xl" with numeric equivalents ("2", "3", "4", "6", "8").
Acceptance (pick one)
Related
Symptom
@dashforge/tw<Stack>accepts agapprop typed asstring. At runtime, only NUMERIC values from a fixed set are honored:"0" | "0.5" | "1" | "2" | "3" | "4" | "6" | "8" | "12" | "16" | "24". Passing size tokens (gap="xs","sm","md","lg","xl") is silently ignored — TS accepts the string, runtime falls back to0, and no warning is emitted.Why this is bad
spacing="md") or any design system that speaks size tokens will make this mistake constantlyRepro
Expected: children separated. Actual:
rowGap: normal, children flush.Discovered while
Refactoring the Blueprint Builder V2 shell. Filed in Blueprint's dogfood report as G-27 (severity: medium — silent-fail DX bug).
Workaround applied in Blueprint
Replaced all
gap="xs|sm|md|lg|xl"with numeric equivalents ("2","3","4","6","8").Acceptance (pick one)
"xs" | "sm" | "md" | "lg" | "xl") to numeric equivalents at runtime, keep the numeric scale as-is (backward compat)console.warnwhen an unknowngapvalue is passed (works alongside either A or B)gap→spaceto disambiguate from flexgapsemantics (documents-only; would be a breaking change requiring a migration note)dashforge-docs-lablists the accepted values explicitlyRelated
gapaxis totheme.components.Stack.defaults— only meaningful once the runtime value set is unambiguous