Repository navigation
refactor: take the type scale from the brand's --vlab-type-* tokens - #4
Merged
Merged
Conversation
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
|
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
site.cssstops copying the type scale.@variablelab/brand0.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 stepsui,inline-code,metaandlabelstill set no line height. The brand has no-line-heighttoken for them either..type-inline-codekeepscolor: var(--vlab-ink).Evidence
Before:
main(brand 0.2.1, raw values), built and served withwrangler dev.After: this branch (brand 0.3.0, tokens), served the same way. Every page, full-page screenshots, pixel by pixel:
//env/run-run/theme-toggle/vlandEach 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:
mainhas 0 references to--vlab-type-*, this branch has 102.og.png, eachog/<project>.png,favicon.svgandapple-touch-icon.pngare byte-identical between the two builds.rr jscandastro 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