What to build
Follow-up from PR #757 review (discussion_r3641178348). While un-nesting typography selectors, a reviewer noted that hard-compiled token values (e.g. u-text("base-dark"), u-display("block"), u-font("sans", "md") in _paragraph.scss) could instead be exposed as CSS custom properties.
This is not limited to paragraph tokens — it's a library-wide question about how sam-styles emits design-token values.
Problem
Today, USWDS mixins and SCSS variables resolve to static values at compile time. Consumers can't override colors, spacing, typography, etc. at runtime, and theming requires recompiling the SCSS.
Proposal
Evaluate and (if aligned with the design-system strategy) migrate the component/branding layers to emit CSS custom properties for design tokens — colors, typography, spacing, borders — so values are:
- Overridable at runtime (theming, dark mode, per-context overrides)
- Inspectable/tweakable via DevTools without a rebuild
- Centralized as
:root (or scoped) --sds-* variables
Acceptance criteria
Notes
This is an HITL discovery/decision ticket — the open questions above must be resolved before any implementation begins. Origin: PR #757 review comment by @mgetzflex.
What to build
Follow-up from PR #757 review (discussion_r3641178348). While un-nesting typography selectors, a reviewer noted that hard-compiled token values (e.g.
u-text("base-dark"),u-display("block"),u-font("sans", "md")in_paragraph.scss) could instead be exposed as CSS custom properties.This is not limited to paragraph tokens — it's a library-wide question about how
sam-stylesemits design-token values.Problem
Today, USWDS mixins and SCSS variables resolve to static values at compile time. Consumers can't override colors, spacing, typography, etc. at runtime, and theming requires recompiling the SCSS.
Proposal
Evaluate and (if aligned with the design-system strategy) migrate the component/branding layers to emit CSS custom properties for design tokens — colors, typography, spacing, borders — so values are:
:root(or scoped)--sds-*variablesAcceptance criteria
--sds-*)Notes
This is an HITL discovery/decision ticket — the open questions above must be resolved before any implementation begins. Origin: PR #757 review comment by @mgetzflex.