Skip to content

P6 — Custom CSS variable name control (nameTemplate) spec#120

Merged
dbanksdesign merged 5 commits into
mainfrom
p6-token-name-template
Jul 5, 2026
Merged

P6 — Custom CSS variable name control (nameTemplate) spec#120
dbanksdesign merged 5 commits into
mainfrom
p6-token-name-template

Conversation

@dbanksdesign

Copy link
Copy Markdown
Collaborator

Summary

  • Adds specs/token-name-template.md — implementation spec for optional nameTemplate control over emitted CSS custom property names from tokens.create.
  • Covers migration from existing CSS variable systems, DTCG/Style Dictionary naming conventions, and cross-package aliasing while preserving today's default --{scopeId}-{namespace}-{path} behavior when nameTemplate is omitted.
  • Links the spec from IMPROVEMENTS.md P6 and adds an empty (docs-only) changeset.

Test plan

  • Review spec for API completeness (TokenNameContext, instance + per-namespace templates, theme/tokens.use()/@property wiring).
  • Confirm default behavior is documented as unchanged (zero breaking change).
  • Verify IMPROVEMENTS.md P6 entry points to the new spec.

Made with Cursor

dbanksdesign and others added 5 commits July 4, 2026 16:59
Add specs/token-name-template.md covering optional control over emitted
CSS custom property names from tokens.create — migration, DTCG/Style
Dictionary interop, and cross-package aliasing — without breaking the
default --{scopeId}-{namespace}-{path} behavior.

Link the spec from IMPROVEMENTS.md P6 and add an empty (docs-only) changeset.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add optional nameTemplate on createTokens and tokens.create so emitted
--* names can match external conventions while proxy refs, theme overrides,
tokens.use(), and @Property registration stay in sync. Includes
flattenTokenPaths, token-naming resolver, tests, and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Raise the main-entry gzip budget for P6 nameTemplate, fast-path default
token naming without flattenTokenPaths, and only wire custom theme naming
when a template is active. Make turbo test wait on dependency builds (^build)
and drop the redundant typestyles pre-build in CI so dist is not wiped
mid-test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dbanksdesign dbanksdesign merged commit 2bfa8a4 into main Jul 5, 2026
7 checks passed
@dbanksdesign dbanksdesign deleted the p6-token-name-template branch July 5, 2026 01:54
@github-actions github-actions Bot mentioned this pull request Jul 5, 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