Skip to content

feat: Add typography shorthand - #589

Merged
drwpow merged 1 commit into
mainfrom
drwpow/font-shorthand
Nov 20, 2025
Merged

drwpow merged 1 commit into
mainfrom
drwpow/font-shorthand

Conversation

@drwpow

@drwpow drwpow commented Nov 20, 2025 •

Copy link
Copy Markdown
Collaborator

Changes

Reland of #479 by @michaelurban. Full credit and approach goes to them! Adds typography shorthand and fixes errors in Sass plugin

How to Review

  • Tests updated; tests should pass

@changeset-bot

changeset-bot Bot commented Nov 20, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 527da37

The changes in this PR will be included in the next version bump.

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying terrazzo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 527da37
Status: ✅  Deploy successful!
Preview URL: https://82c1e38c.terrazzo.pages.dev
Branch Preview URL: https://drwpow-font-shorthand.terrazzo.pages.dev

View logs

@drwpow
drwpow merged commit 8f32d44 into main Nov 20, 2025
9 checks passed
@drwpow
drwpow deleted the drwpow/font-shorthand branch November 20, 2025 02:30
@github-actions github-actions Bot mentioned this pull request Nov 20, 2025
drwpow pushed a commit that referenced this pull request Jun 7, 2026
* fix(plugin-sass): forward CSS plugin's localID in transform hook

The sass transform was setting `localID: token.id` (the dotted DTCG
id), which the main `$__token-values` loop in build.ts then turned
into a CSS variable name from scratch — bypassing the CSS plugin's
`variableName` and producing `var(--color-blue-40)` instead of
`var(--pcl-color-blue-40)`. The typography mixins map was unaffected
because that loop queries `format: 'css'` directly.

Forwarding `token.localID` instead preserves any prefix or casing
customization configured via `variableName` on plugin-css.

Regression introduced in 2.2.0 (PR #589) when the main loop in
build.ts switched from `format: 'css'` to `format: FORMAT_ID`.

* test(plugin-sass): update want.scss fixture for forwarded localID

The basic fixture configures plugin-css with a 'ds' variableName prefix.
With localID now forwarded, the $__token-values Sass map correctly
references the --ds- prefixed CSS variables, matching want.css.

* docs(plugin-sass): use ds prefix example in changeset
@github-actions github-actions Bot mentioned this pull request Jun 7, 2026
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