Skip to content

feat(css): parameterize component sizing with scale tokens#8

Open
Reebz wants to merge 1 commit into
bluedusk:mainfrom
Reebz:feat/component-scale-tokens
Open

feat(css): parameterize component sizing with scale tokens#8
Reebz wants to merge 1 commit into
bluedusk:mainfrom
Reebz:feat/component-scale-tokens

Conversation

@Reebz

@Reebz Reebz commented Jun 9, 2026

Copy link
Copy Markdown

What

Retuning component density meant overriding hundreds of literal clamp() values across the component selectors.

  • A :root scale-token ramp in components.css adds a --scale multiplier and a --max-content-width, reusing and extending the ramp already defined but never consumed in viewport-base.css.
  • The component font sizes and max-widths route through the tokens. The defaults reproduce today's sizing exactly, so --scale: 1 is a pixel-identical no-op, and an author retunes density by setting --scale and --max-content-width once on .deck or :root.
  • SKILL.md gains a short note to prefer component classes over per-element inline font sizes, so the knob is not fought by inline styles.

This is a parameterization refactor, not a restyle. Visual defaults are unchanged.

Test

  • With --scale: 1, every component renders at its current size.
  • Raising --scale enlarges titles, body, and stat numbers proportionally, and --max-content-width narrows or widens the constrained components.
  • A deck that set sizes through the old literal values still renders correctly.

Dependencies

Touches components.css and viewport-base.css, so it is cleanest to merge after the responsive-presentation PR.

Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) noreply@anthropic.com

Retuning component density meant overriding hundreds of literal clamp() values. Add a :root scale-token ramp with a --scale multiplier and --max-content-width, reusing the orphaned ramp already sitting unused in viewport-base.css, and route the component sizes through it. Defaults reproduce today's sizing exactly, so --scale: 1 is a no-op.

Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@Reebz is attempting to deploy a commit to the bluedusk's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant