Skip to content

P3.24 — @property on token leaves + styles.property#105

Merged
dbanksdesign merged 3 commits into
mainfrom
p3-24-property-tokens
Jun 17, 2026
Merged

P3.24 — @property on token leaves + styles.property#105
dbanksdesign merged 3 commits into
mainfrom
p3-24-property-tokens

Conversation

@dbanksdesign

Copy link
Copy Markdown
Collaborator

Summary

  • Add opt-in { value, syntax, inherits? } leaf shape to tokens.create — descriptor leaves register @property, emit :root defaults, and return { name, var, toString } refs instead of plain var(...) strings.
  • Add styles.property(id, options?) for standalone registered custom properties (scoped under {scopeId}-property-{id}).
  • Extract shared @property registration into registered-property.ts; ComponentInternalVarRef now includes toString() coercion.

Test plan

  • npm test in packages/typestyles (347 tests)
  • npm run build passes (bundle budget bumped ~764 bytes for new API surface)
  • Verify typed token leaves work in a component variant override: [ref.name]: value
  • Verify styles.property with syntax + value animates/transitions as expected in a browser

Made with Cursor

dbanksdesign and others added 3 commits June 17, 2026 16:01
Typed token descriptor leaves and standalone styles.property register @Property rules and return name/var/toString refs for variant overrides and transitions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore precise TokenRef leaf inference without TokenValues intersection (fixes design-system accent.default access), add valueOf to RegisteredPropertyRef, and remove unused insertRule import.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dbanksdesign dbanksdesign merged commit 0729526 into main Jun 17, 2026
6 checks passed
@dbanksdesign dbanksdesign deleted the p3-24-property-tokens branch June 17, 2026 23:16
@github-actions github-actions Bot mentioned this pull request Jul 4, 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