Skip to content

refactor: take the type scale from the brand's --vlab-type-* tokens - #4

Merged
rqbazan merged 1 commit into
mainfrom
refactor/type-tokens
Oct 17, 2026
Merged

rqbazan merged 1 commit into
mainfrom
refactor/type-tokens

Conversation

@rqbazan

@rqbazan rqbazan commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

site.css stops copying the type scale. @variablelab/brand 0.3.0 publishes it as --vlab-type-<step>-* tokens, and each .type-* class reads them.

 @variablelab/brand  0.2.1 → 0.3.0

 .type-display {
-  font-family: var(--vlab-font-sans);
-  font-size: 42px;
-  line-height: 1;
-  font-weight: 500;
-  letter-spacing: -0.035em;
+  font-family: var(--vlab-type-display-family);
+  font-size: var(--vlab-type-display-size);
+  line-height: var(--vlab-type-display-line-height);
+  font-weight: var(--vlab-type-display-weight);
+  letter-spacing: var(--vlab-type-display-tracking);
 }
 … the same for the other 10 steps
  • ui, inline-code, meta and label still set no line height. The brand has no -line-height token for them either.
  • .type-inline-code keeps color: var(--vlab-ink).

Evidence

  • Before: main (brand 0.2.1, raw values), built and served with wrangler dev.
    After: this branch (brand 0.3.0, tokens), served the same way. Every page, full-page screenshots, pixel by pixel:

    Page 1280 834 390
    / 0.0000% 0.0000% 0.0000%
    /env 0.0000% 0.0000% 0.0000%
    /run-run 0.0000% 0.0000% 0.0000%
    /theme-toggle 0.0000% 0.0000% 0.0000%
    /vland 0.0000% 0.0000% 0.0000%

    Each pair has the same dimensions, and no pixel differs at all.

  • The computed style (family, size, line height, weight, tracking and color) of every .type-* element is identical on both, at every width.

  • The served HTML differs as it should: main has 0 references to --vlab-type-*, this branch has 102.

  • og.png, each og/<project>.png, favicon.svg and apple-touch-icon.png are byte-identical between the two builds.

  • rr jsc and astro check: clean.

Merge Danger

Door: two-way.

Reverting this restores the copied values; nothing else depends on it.

Blast Radius: none.

The render is pixel-identical on every page at the three widths of docs/design.md#verifying.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N8f1sEEDiR2ikgqtHWXgYn

site.css copied each step of typography.md by hand. @variablelab/brand
0.3.0 publishes the scale as tokens, so each .type-* class now reads its
family, size, line height, weight and tracking from tokens.css.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N8f1sEEDiR2ikgqtHWXgYn
@changeset-bot

changeset-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0ee7e0a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
0ee7e0a 2026-10-17T20:24:18.853Z View logs ↗

@rqbazan
rqbazan merged commit 1787ce0 into main Oct 17, 2026
2 of 3 checks passed
@rqbazan
rqbazan deleted the refactor/type-tokens branch October 17, 2026 20:29
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