Repository navigation
feat: publish the type scale as --vlab-type-* tokens - #7
Merged
Merged
Conversation
tokens.json holds the scale under `type`. The build writes each step to tokens.css as --vlab-type-<step>-size, -line-height, -weight, -tracking and -family, to theme.css as Tailwind's text-<step>, and to the scale table in typography.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8f1sEEDiR2ikgqtHWXgYn
🦋 Changeset detectedLatest commit: 9589742 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merged
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
The type scale in
typography.mdbecomes tokens.tokens.jsonis its source, and the table in the chapter is now generated from it.ui,inline-code,meta,label) has no-line-heighttoken: it keeps the one of the text it sits in.-familyisvar(--vlab-font-sans)orvar(--vlab-font-mono), so the stacks still live in one place.uisets 500 for a name, andinline-codeis set inink. The stepinline codeis spelledinline-code, as its tokens are.typography.mdgets an "In code" section naming the tokens, the Tailwind utilities andtokens.json.color.mdandAGENTS.mdpoint to them.Evidence
Before:
pnpm checkpasses, with no type tokens; www'ssrc/styles/site.csscopies the scale by hand into.type-*.After:
pnpm buildwritestokens.css,theme.cssandtypography.md;pnpm checkexits 0. Each generated value matches www's.type-*rules exactly, property by property:Merge Danger
Door: two-way until the release, then one-way.
Once
chore: update versionspublishes, the--vlab-type-*andtext-<step>names are public: renaming one later is a major release.Blast Radius: additive.
New custom properties on
:rootand new Tailwind font sizes only. None of the step names collide with Tailwind's defaulttext-*sizes or with the color tokens. www and env's docsite readtokens.jsonby group name (color,syntax,font), so the newtypegroup doesn't touch them, and env importstokens.css, nottheme.css.🤖 Generated with Claude Code
https://claude.ai/code/session_01N8f1sEEDiR2ikgqtHWXgYn