Repository navigation
feat(typography): emit every fluid type scale as both clamp() and pow() tokens - #90
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 56bd3b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Hebilicious
added this pull request to stack #93
October 7, 2026 21:03
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
cssforge | 56bd3b3 | Commit Preview URL Branch Preview URL |
Oct 08 2026, 08:16 AM |
Add settings.output: "clamp" | "pow" to fluid type scales. Pow mode emits the six scale inputs and the fluid, at-narrow and at-wide helpers as scale-prefixed tokens and derives each step with pow(). Steps keep their clamp-mode names and paths, steps below 0 divide step 0 by the narrow ratio, and the fluid type checks use the sizes pow produces. relativeTo maps to 100vw, 100vi or 100cqi. Closes #82 Co-Authored-By: Claude <noreply@anthropic.com>
Refs #82 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hebilicious
force-pushed
the
feat/issue-82-pow-scale
branch
from
October 7, 2026 22:45
7e0d858 to
503c65f
Compare
…fault
The CSS function is a CSS generation option, not token data:
`GenerateCSSOptions.fluidTypeFunction` ("pow" by default, or "clamp"),
passed to generateCSS and set by the --fluid-type-function CLI flag.
`settings.output` is removed from the token config.
Every step has one canonical size at minWidth and maxWidth. Steps 0 and
above are utopia's; step -n is step 0 / minTypeScale^n, so a small size
never shrinks. The checks, both CSS functions and the tokens use it.
JSON, TypeScript and Style Dictionary are identical for both functions:
each step token holds its clamp(), and the pow inputs and helpers are
CSS-only declarations (Output.cssOnly) that the CSS key collision check
still covers.
Refs #82
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #82 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…okens Replace the CSS-only fluidTypeFunction option, the --fluid-type-function flag and Output.cssOnly. Every output now holds both representations of each fluid type scale, built in one loop from the canonical step sizes: - clamp() steps keep their names and paths, --typography_fluid-<scale>[-<prefix>]-<label> at typography_fluid.<scale>@<label>; steps 0 and above match utopia. - pow tokens: inputs and helpers at typography_fluid.<scale>.pow.<name>, steps at typography_fluid.<scale>.pow@<label>, keyed --typography_fluid-<scale>[-<prefix>]-pow-<name|label>. Helpers and steps are semantic and carry referencePaths through getReferencePaths. A label that gives a pow key fails the key collision check, and the label "pow" is rejected because it names the pow segment. Refs #82 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… from minWidth, maxWidth, minFontSize, maxFontSize, minTypeScale and maxTypeScale become pow-min-width, pow-max-width, pow-min-font-size, pow-max-font-size, pow-min-type-scale and pow-max-type-scale. The helpers become pow-progress, pow-at-min and pow-at-max. Refs #82 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hebilicious
marked this pull request as ready for review
October 8, 2026 08:24
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.
Closes #82.
Every fluid type scale is written in two forms, side by side, in every output (CSS, JSON, TS, Style Dictionary). There is no option, and no output differs from another.
--typography_fluid-<scale>[-<prefix>]-<label>typography_fluid.<scale>@<label>--typography_fluid-<scale>[-<prefix>]-pow-<name>typography_fluid.<scale>.pow.<name>--typography_fluid-<scale>[-<prefix>]-pow-<label>typography_fluid.<scale>.pow@<label>clamp(). Steps 0 and above are byte-identical to utopia.min-width,max-width,min-font-size,max-font-size,min-type-scaleandmax-type-scale(named after the config keys they come from, as plain numbers), plus theprogress,at-minandat-maxhelpers, with every step derived throughpow(). Changing an input at:rootchanges the whole scale at runtime.referencePaths.relativeTomaps tovw,viorcqiin both forms.powis rejected, because Style Dictionary would merge it with the pow tokens.pow()support: Chrome 120, Firefox 118, Safari 15.4.🤖 Generated with Claude Code