Repository navigation
Conversation
Add ten typography roles (heading-lg/md/sm, body-md/sm, label-md/sm, code-sm, body-md-relaxed, body-sm-relaxed). Each role is four CSS variables in themes/default.css, bridged to Tailwind text-* utilities in theme.bridge.css. Register the role names in core's cn() so a role is kept next to a text color class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The path resolved outside the repository and matched no file, so utility classes used only in examples were not generated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the Typography section of the styling guide, add a live example, add decisions/typography-roles.md, and add a changeset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add letter spacing to the role spec test, add a leading-none order test for cn(), and reword the default palette and template comments so they do not contradict themselves. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… data Document that cream and bloom ignore leading-* and tracking-* on h1-h6, the astw: prefix limit of cn(), and that a role sets its own weight and letter spacing. Fix the ADR source table (four sources, usage counts) and record the cn() registration as a deviation from the first plan. Make the docs example self-contained. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The compile test only checked font-size for each role. A literal added to the bridge after the role entries could change line-height, weight or letter-spacing without failing the test. Assert all four values against the var() references. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ter spacing The sentence after the typography example only named leading-none. Align it with the Change a role paragraph. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The relaxed roles change only line height, so a one-line sample does not show the difference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show the same paragraph in body-md and body-md-relaxed (and body-sm and body-sm-relaxed) so the line height difference is visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Code Metrics Report
Details | | main (529b3ac) | #572 (9d5f2ec) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 87.6% | 87.6% | +0.0% |
| Files | 206 | 206 | 0 |
| Lines | 6090 | 6092 | +2 |
+ | Covered | 5335 | 5337 | +2 |
+ | Test Execution Time | 2m14s | 1m27s | -47s |Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)
Reported by octocov |
wemra3
marked this pull request as draft
October 5, 2026 00:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wemra3
marked this pull request as ready for review
October 5, 2026 00:21
Contributor
|
@wemra3 this looks good to go, but can you resolve conflicts? I will approve this PR after that 🙏 |
Resolve conflicts with the semantic colour roles (#569): keep the typography roles as a new section 8 block in default.css, merge the inherited-token notes in theme.css and _template.css, keep both the 40-role and the typography bridge tests, and regenerate docs-manifest.json with docs:sync.
IzumiSy
approved these changes
Oct 8, 2026
IzumiSy
left a comment
Contributor
There was a problem hiding this comment.
Looks good!
Can I get eyes from @interacsean, too?
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.
Motivation
AppShell defines a font family but no typography tokens. The styling guide gives a table of utility pairings, and real code matches it in only 15% to 40% of places (analysis in tailor-inc/platform-planning#1580). Without names for text styles, people and AI agents choose size, weight, and line height again for each element.
This PR adds the tokens only. No component uses them yet, so nothing changes visually.
Design Decision
Tokens first, in two layers like the colors
themes/default.cssholds four variables per role:--app-shell-type-<role>-<size|line-height|weight|letter-spacing>.theme.bridge.cssmaps them to--text-<role>inside the existing@theme inline, withvar()references only.@theme inlinewrites literal values into the utility, so values placed in the bridge could not be overridden on:root.Ten roles with today's values
heading-lg,heading-md,heading-sm,body-md,body-sm,label-md,label-sm,code-sm, plusbody-md-relaxedandbody-sm-relaxedfor long text. The values match the current utility pairings. Line height is a unitless ratio on a 4px grid.code-smneedsfont-mono, because--text-*cannot setfont-family.cn()registers the role namestailwind-mergereads an unknowntext-*class as a text color. Without registration,cn("text-label-md", "text-muted-foreground")keeps only the color, so a role passed inclassNameto an AppShell component would be lost. Core'scn()now registers the ten names in thefont-sizegroup. This change is limited tolib/utils.tsand its test.Modifiers are a documented rule
A role may be combined with
leading-none,tabular-nums,font-mediumorfont-semibold, anduppercase. This is written in the styling guide. There is no lint rule.Summary
text-*utilities.cn().decisions/typography-roles.md.@sourcepath, which pointed to a folder that does not exist. This affects the docs app only.Not in this PR
Applying roles to core components, a
Textcomponent,overline, moving 10px and 11px text to 12px, andtabular-numsas the default for numeric DataTable columns.Question for reviewers
The cream and bloom palettes set
line-height: 1.2andletter-spacing: -0.03emonhtml :where(h1, h2, h3, h4, h5, h6)outside any@layer. This rule wins over a role utility on those elements. This PR keeps the rule and documents the effect. What does the rule protect, and should it stay after heading roles are applied?🤖 Generated with Claude Code